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
TheNetStriker 2021-05-11 16:17:22 +02:00 committed by GitHub
parent 19395dfaca
commit 1b002cf76d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -100,6 +100,7 @@ export default {
let nodeid = t.properties.zwave_nodeid
let bridgeUID = t.bridgeUID
let listening = t.properties.zwave_listening === 'true'
let neighbours = t.properties.zwave_neighbours ? t.properties.zwave_neighbours : ''
serie.data.push({
name: nodeid,
value: t.label,
@ -110,7 +111,7 @@ export default {
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)
if (!returnlink) {
serie.links.push({