Skip to content

Commit e7ef16f

Browse files
committed
Passing undefined values to custom property views
1 parent 3f05ced commit e7ef16f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firecms_core/src/preview/PropertyPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
5656
propertyConfigs: customizationController.propertyConfigs
5757
});
5858

59-
if (value === undefined || property === null) {
59+
if (property === null) {
6060
content = <EmptyValue/>;
6161
} else if (property.Preview) {
6262
content = createElement(property.Preview as React.ComponentType<PropertyPreviewProps>,
@@ -70,7 +70,7 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
7070
// entity,
7171
customProps: property.customProps
7272
});
73-
} else if (value === null) {
73+
} else if (value === undefined || value === null) {
7474
content = <EmptyValue/>;
7575
} else if (property.dataType === "string") {
7676
const stringProperty = property as ResolvedStringProperty;

0 commit comments

Comments
 (0)