diff --git a/src/UI/Map/Marker.svelte b/src/UI/Map/Marker.svelte index 1e76758b6..477ad9620 100644 --- a/src/UI/Map/Marker.svelte +++ b/src/UI/Map/Marker.svelte @@ -7,8 +7,9 @@ */ export let icons: string | { icon: string; color: string }[] + let iconsParsed: { icon: string; color: string }[] if(typeof icons === "string") { - icons = icons.split(";").map(subspec => { + iconsParsed = icons.split(";").map(subspec => { if(subspec.startsWith("http://") || subspec.startsWith("https://")){ return { icon: subspec, color: "black" @@ -19,6 +20,8 @@ icon, color: color ?? "black" } }) + }else{ + iconsParsed = icons } /** @@ -32,9 +35,9 @@ export let size = "w-full h-full" -{#if icons !== undefined && icons.length > 0} +{#if iconsParsed !== undefined && iconsParsed.length > 0}
- {#each icons as icon} + {#each iconsParsed as icon}