[BUGFIX] check for gateways without mesh

This commit is contained in:
Martin Geno 2017-05-14 00:50:20 +02:00
parent ecf73dd7ab
commit d0c5fb2dab
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941

View File

@ -87,7 +87,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'],
nodes.forEach(function (d) { nodes.forEach(function (d) {
d.neighbours = []; d.neighbours = [];
if (d.flags.gateway) { if (d.flags.gateway && d.nodeinfo.network.mesh) {
var mesh = d.nodeinfo.network.mesh; var mesh = d.nodeinfo.network.mesh;
mesh[Object.keys(mesh)[0]].interfaces.tunnel.forEach(function (mac) { mesh[Object.keys(mesh)[0]].interfaces.tunnel.forEach(function (mac) {
gateways[mac] = d.nodeinfo.hostname; gateways[mac] = d.nodeinfo.hostname;