Skip to content

Commit

Permalink
chore(web): fix beta infobox content error (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
airslice authored Apr 10, 2024
1 parent 9317d29 commit c7686ed
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const Content: React.FC<Props> = ({ 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);
Expand All @@ -61,7 +61,7 @@ const Content: React.FC<Props> = ({ block, isEditable, ...props }) => {
return (
<Wrapper>
{!context?.editMode ? (
displayTypeField.value === "custom" ? (
displayTypeField?.value === "custom" ? (
properties ? (
<CustomFields properties={properties()} extensionId={block?.extensionId} />
) : (
Expand Down

0 comments on commit c7686ed

Please sign in to comment.