From c7686ed691199f87333e4db630e6ff44288994a1 Mon Sep 17 00:00:00 2001 From: lby Date: Wed, 10 Apr 2024 16:54:35 +0800 Subject: [PATCH] chore(web): fix beta infobox content error (#956) --- .../Crust/Infobox/Block/builtin/PropertyList/Content.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/beta/features/Visualizer/Crust/Infobox/Block/builtin/PropertyList/Content.tsx b/web/src/beta/features/Visualizer/Crust/Infobox/Block/builtin/PropertyList/Content.tsx index 0773c5cece..d12c7d97a8 100644 --- a/web/src/beta/features/Visualizer/Crust/Infobox/Block/builtin/PropertyList/Content.tsx +++ b/web/src/beta/features/Visualizer/Crust/Infobox/Block/builtin/PropertyList/Content.tsx @@ -49,9 +49,9 @@ const Content: React.FC = ({ block, isEditable, ...props }) => { // properties needs to be re-rendered each time to have correct values from the viz ref const properties = () => { - if (displayTypeField.value === "custom") { + if (displayTypeField?.value === "custom") { return propertyListField.value; - } else if (displayTypeField.value === "rootOnly") { + } else if (displayTypeField?.value === "rootOnly") { return filterTypeFrom(visualizer.current?.layers.selectedFeature()?.properties, "object"); } else { return filterChildObjectsToEnd(visualizer.current?.layers.selectedFeature()?.properties); @@ -61,7 +61,7 @@ const Content: React.FC = ({ block, isEditable, ...props }) => { return ( {!context?.editMode ? ( - displayTypeField.value === "custom" ? ( + displayTypeField?.value === "custom" ? ( properties ? ( ) : (