From e6f0b8024d74cd85e555873b03e6e1818461750d Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 5 Dec 2023 00:04:11 +0100 Subject: [PATCH] Allow for a layer to not have a marker when loading from studio --- src/Logic/DetermineLayout.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Logic/DetermineLayout.ts b/src/Logic/DetermineLayout.ts index 33903d91e3..0b0e9b9a7d 100644 --- a/src/Logic/DetermineLayout.ts +++ b/src/Logic/DetermineLayout.ts @@ -139,9 +139,9 @@ export default class DetermineLayout { const layerConfig = json const iconTr: string | TagRenderingConfigJson = ( layerConfig.pointRendering - .map((mr) => mr.marker.find((icon) => icon.icon !== undefined).icon) + .map((mr) => mr?.marker?.find((icon) => icon.icon !== undefined)?.icon) .find((i) => i !== undefined) - ) + ) ?? "bug" const icon = new TagRenderingConfig(iconTr).render.txt json = { id: json.id,