diff options
Diffstat (limited to 'web/js/nms-map-handlers.js')
-rw-r--r-- | web/js/nms-map-handlers.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/web/js/nms-map-handlers.js b/web/js/nms-map-handlers.js index d553fc0..f5f072b 100644 --- a/web/js/nms-map-handlers.js +++ b/web/js/nms-map-handlers.js @@ -873,10 +873,14 @@ function memoryInfo(sw) { } function tagged(sw, tag) { - if (testTree(nmsData,['switches','switches',sw, 'tags'])) { - if (nmsData.switches.switches[sw].tags.includes(tag)) { - return true; + try { + if (testTree(nmsData,['switches','switches',sw, 'tags'])) { + if (nmsData.switches.switches[sw].tags.includes(tag)) { + return true; + } } + } catch(e) { + console.log("Tried to find tags for " + sw + "but tags-datastructure is probably not an array?"); } return false; } |