fix: use global isExternalIcon to allow local custom icons in regiments & prevent unscaled svg crashing v1.109 loads

This commit is contained in:
Richard Standow 2026-02-27 10:48:48 +00:00
parent 743d45c318
commit 6d000f7b06
3 changed files with 13 additions and 9 deletions

View file

@ -42,7 +42,7 @@ function drawMarker(marker, rescale = 1) {
const viewX = rn(x - zoomSize / 2, 1);
const viewY = rn(y - zoomSize, 1);
const isExternal = icon.startsWith("http") || icon.startsWith("data:image") || icon.includes(".svg") || icon.includes("/");
const isExternal = typeof icon === "string" && (icon.startsWith("http") || icon.startsWith("data:image") || icon.includes(".svg") || icon.includes("/"));
return /* html */ `
<svg id="${id}" viewbox="0 0 30 30" width="${zoomSize}" height="${zoomSize}" x="${viewX}" y="${viewY}">