From b2c2627d73936efbea7723ba022a9e714ec1d4ed Mon Sep 17 00:00:00 2001 From: Milan Paessler Date: Tue, 14 Feb 2017 21:31:06 +0100 Subject: [PATCH] infobox: fix error when gateway could not be resolved --- lib/infobox/node.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index f975f64..34e1ee2 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -329,6 +329,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"], el.appendChild(createLink(nh, router)) num++ if (!nh.node || !nh.node.statistics) break + if (!dictGet(nh.node.statistics, ["gateway"]) || !dictGet(nh.node.statistics, ["gateway"]).id) break if (dictGet(nh.node.statistics, ["gateway"]).id !== gw.id) break if (dictGet(nh.node.statistics, ["gateway_nexthop"])) nh = dictGet(nh.node.statistics, ["gateway_nexthop"])