main: fix missing location error
This commit is contained in:
parent
2e823a90c8
commit
c541f5b721
|
@ -87,7 +87,13 @@ function (moment, Router, L, GUI, numeral) {
|
|||
ids = [d.source.node.nodeinfo.node_id, d.target.node.nodeinfo.node_id]
|
||||
d.id = ids.join("-")
|
||||
|
||||
if (unknown || !("location" in d.source.node.nodeinfo && "location" in d.target.node.nodeinfo))
|
||||
if (unknown ||
|
||||
!d.source.node.nodeinfo.location ||
|
||||
!d.target.node.nodeinfo.location ||
|
||||
isNaN(d.source.node.nodeinfo.location.latitude) ||
|
||||
isNaN(d.source.node.nodeinfo.location.longitude) ||
|
||||
isNaN(d.target.node.nodeinfo.location.latitude) ||
|
||||
isNaN(d.target.node.nodeinfo.location.longitude))
|
||||
return
|
||||
|
||||
d.latlngs = []
|
||||
|
|
Loading…
Reference in a new issue