Skip to content

Commit ef43f97

Browse files
committed
fix: exceptions
1 parent dbeb6ac commit ef43f97

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fields/configure/configure-component.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// import Input, { InputLabel } from '@material-ui/core/Input'; // eslint-disable-line import/no-named-default
2-
import has from 'lodash/has';
32
import getComponentProps from './get-component-props';
43
import getLabelComponentProps from './get-label-component-props';
54
import getLabelComponent from './get-label-component';
@@ -13,10 +12,10 @@ const getClassName = ({ uiSchema = {} }) => {
1312
export default (props) => {
1413
const { schema, uiSchema = {}, components } = props;
1514
const title = uiSchema['ui:title'] || schema.title;
16-
const component = (schema && has(schema, 'component')) && schema.component;
15+
const component = (schema && 'component' in schema) && schema.component;
1716
const isCustomComponent = (component
1817
&& components
19-
&& has(components, component)
18+
&& component in components
2019
&& components[component])
2120
|| false;
2221

src/fields/configure/get-component.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default ({ schema, uiSchema = {}, components }) => {
1313

1414
if (
1515
component
16+
&& components
1617
&& component in components
1718
&& typeof components[component] === 'function'
1819
) {

0 commit comments

Comments
 (0)