diff --git a/packages/entity/src/behavior-components/literal.jsx b/packages/entity/src/behavior-components/literal.jsx index 11342ed..c49b50a 100644 --- a/packages/entity/src/behavior-components/literal.jsx +++ b/packages/entity/src/behavior-components/literal.jsx @@ -1,5 +1,6 @@ import {join} from 'path'; +import {Context} from '@avocado/behavior'; import {PropTypes, React} from '@latus/react'; import { Number, @@ -109,8 +110,14 @@ const Literal = ({ value={null === value ? [0, 0] : value} /> ); - default: + case 'function': + case 'null': + case 'array': return null; + default: + return 'undefined' !== typeof value + ? valueComponent(path, Context.inferTypeOf(value), {value}) + : null; } }; return (