diff --git a/desktop/app/src/ui/components/data-inspector/DataDescription.tsx b/desktop/app/src/ui/components/data-inspector/DataDescription.tsx index a8c22188c..724bf467d 100644 --- a/desktop/app/src/ui/components/data-inspector/DataDescription.tsx +++ b/desktop/app/src/ui/components/data-inspector/DataDescription.tsx @@ -80,6 +80,11 @@ const ColorPickerDescription = styled.div({ }); ColorPickerDescription.displayName = 'DataDescription:ColorPickerDescription'; +const EmptyObjectValue = styled.span({ + fontStyle: 'italic', +}); +EmptyObjectValue.displayName = 'DataDescription:EmptyObjectValue'; + type DataDescriptionProps = { path?: Array; type: string; @@ -708,11 +713,14 @@ class DataDescriptionContainer extends PureComponent<{ case 'null': return null; + // no description necessary as we'll typically wrap it in [] or {} which + // already denotes the type case 'array': + return val.length <= 0 ? [] : null; case 'object': - // no description necessary as we'll typically wrap it in [] or {} which already denotes the - // type - return null; + return Object.keys(val).length <= 0 ? ( + {'{}'} + ) : null; case 'function': return (