Fix Z-Wave network viewer not working when nodes have no zwave_neighbours
Fixes #1037. Signed-off-by: David Masshardt <david@masshardt.ch>pull/1051/head
parent
19395dfaca
commit
1b002cf76d
|
@ -100,6 +100,7 @@ export default {
|
||||||
let nodeid = t.properties.zwave_nodeid
|
let nodeid = t.properties.zwave_nodeid
|
||||||
let bridgeUID = t.bridgeUID
|
let bridgeUID = t.bridgeUID
|
||||||
let listening = t.properties.zwave_listening === 'true'
|
let listening = t.properties.zwave_listening === 'true'
|
||||||
|
let neighbours = t.properties.zwave_neighbours ? t.properties.zwave_neighbours : ''
|
||||||
serie.data.push({
|
serie.data.push({
|
||||||
name: nodeid,
|
name: nodeid,
|
||||||
value: t.label,
|
value: t.label,
|
||||||
|
@ -110,7 +111,7 @@ export default {
|
||||||
borderWidth: 3
|
borderWidth: 3
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
t.properties.zwave_neighbours.split(',').forEach((n) => {
|
neighbours.split(',').forEach((n) => {
|
||||||
let returnlink = serie.links.find((l) => l.target === nodeid && l.source === n)
|
let returnlink = serie.links.find((l) => l.target === nodeid && l.source === n)
|
||||||
if (!returnlink) {
|
if (!returnlink) {
|
||||||
serie.links.push({
|
serie.links.push({
|
||||||
|
|
Loading…
Reference in New Issue