diff --git a/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx b/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx index 002a5b0cd1..b8ffa929de 100644 --- a/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx +++ b/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx @@ -430,6 +430,10 @@ const Subfeature = (props: BaseProps) => { ) } +function isEmpty(obj: Record) { + return Object.keys(obj).length === 0 +} + export const BaseFeatureDetails = observer((props: BaseInputProps) => { const classes = useStyles() const { model } = props @@ -438,6 +442,10 @@ export const BaseFeatureDetails = observer((props: BaseInputProps) => { return null } const feature = JSON.parse(JSON.stringify(model.featureData)) + + if (isEmpty(feature)) { + return null + } return (