From 7d145141c12ab30078eeedbefeedea2e1cd41692 Mon Sep 17 00:00:00 2001 From: Milan Paessler Date: Sat, 19 Nov 2016 01:59:44 +0100 Subject: [PATCH] infobox/node: handle unknown model when showing router img --- lib/infobox/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index 0e7e993..f8e0228 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -372,7 +372,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], function showNodeImg(o, model) { if (!model) - return undefined + return document.createTextNode("Knotenname") var content, caption var modelhash = model.split("").reduce(function(a, b) { @@ -418,7 +418,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], try { config.hwImg.forEach(function(hwImg) { try { - top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model)) + top.appendChild(showNodeImg(hwImg, dictGet(d, ["nodeinfo", "hardware", "model"]))) } catch (err) { console.log(err.message) }