Skip to content

Commit 5ef1a15

Browse files
authored
Merge pull request #5940 from tim-lai/master
housekeeping: prevent log warning for missing getComponent in production #5919
2 parents 4b81aea + 1d4125a commit 5ef1a15

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/json-schema-components.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ export class JsonSchemaForm extends Component {
5353
// In the json schema rendering code, we optimistically query our system for a number of components.
5454
// If the component doesn't exist, we optionally suppress these warnings.
5555
let getComponentSilently = (name) => getComponent(name, false, { failSilently: true })
56-
let Comp = (format ? getComponentSilently(`JsonSchema_${type}_${format}`) : getComponentSilently(`JsonSchema_${type}`)) || getComponentSilently("JsonSchema_string")
56+
57+
let Comp = (format ?
58+
getComponentSilently(`JsonSchema_${type}_${format}`) :
59+
getComponentSilently(`JsonSchema_${type}`)) ||
60+
getComponentSilently("JsonSchema_string")
61+
5762
return <Comp { ...this.props } errors={errors} fn={fn} getComponent={getComponent} value={value} onChange={onChange} schema={schema} disabled={disabled}/>
5863
}
5964

0 commit comments

Comments
 (0)