Skip to content

Commit

Permalink
Passing undefined values to custom property views
Browse files Browse the repository at this point in the history
  • Loading branch information
fgatti675 committed Dec 13, 2024
1 parent 3f05ced commit e7ef16f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/firecms_core/src/preview/PropertyPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
propertyConfigs: customizationController.propertyConfigs
});

if (value === undefined || property === null) {
if (property === null) {
content = <EmptyValue/>;
} else if (property.Preview) {
content = createElement(property.Preview as React.ComponentType<PropertyPreviewProps>,
Expand All @@ -70,7 +70,7 @@ export const PropertyPreview = React.memo(function PropertyPreview<T extends CMS
// entity,
customProps: property.customProps
});
} else if (value === null) {
} else if (value === undefined || value === null) {
content = <EmptyValue/>;
} else if (property.dataType === "string") {
const stringProperty = property as ResolvedStringProperty;
Expand Down

0 comments on commit e7ef16f

Please sign in to comment.