infobox: fix error when gateway could not be resolved

This commit is contained in:
Milan Paessler 2017-02-14 21:31:06 +01:00
parent a7756c44e8
commit b2c2627d73

View file

@ -329,6 +329,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
el.appendChild(createLink(nh, router)) el.appendChild(createLink(nh, router))
num++ num++
if (!nh.node || !nh.node.statistics) break 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"]).id !== gw.id) break
if (dictGet(nh.node.statistics, ["gateway_nexthop"])) if (dictGet(nh.node.statistics, ["gateway_nexthop"]))
nh = dictGet(nh.node.statistics, ["gateway_nexthop"]) nh = dictGet(nh.node.statistics, ["gateway_nexthop"])