aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-10 02:13:23 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-10 02:15:00 +0800
commit4533c104e4673fbf1f2ba1a08e81b8fd58eca0cf (patch)
tree4607278d2f11427d93850fb64d48906c25d03d7e
parent1a5da7bf1063417c77acec3ac8424e8543682d52 (diff)
fix: null check for config.id
-rw-r--r--src/dumbymap.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs
index 8203818..ac8392c 100644
--- a/src/dumbymap.mjs
+++ b/src/dumbymap.mjs
@@ -316,7 +316,7 @@ export const generateMaps = (container, { layouts = [], delay, renderCallback }
316 // Set unique ID for map container 316 // Set unique ID for map container
317 const mapIdList = [] 317 const mapIdList = []
318 const assignMapId = config => { 318 const assignMapId = config => {
319 let mapId = config.id.replaceAll('\x20', '_') 319 let mapId = config.id?.replaceAll('\x20', '_')
320 if (!mapId) { 320 if (!mapId) {
321 mapId = config.use?.split('/')?.at(-1) 321 mapId = config.use?.split('/')?.at(-1)
322 let counter = 1 322 let counter = 1