Skip to content

Commit 8a2b9bc

Browse files
committed
Filter all dead links
1 parent 83c9fd8 commit 8a2b9bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Zigbee2mqttNetworkmap.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ export default {
137137
_cssClass: d.type.toLowerCase()
138138
}
139139
})
140+
const nodes = attr.nodes.map(e => e.ieeeAddr)
140141
this.links = this.merge(
141142
this.links,
142143
attr.links.filter(
143-
e => e.sourceIeeeAddr !== '0x0000000000000000' && e.targetIeeeAddr !== '0x0000000000000000'
144+
e => nodes.includes(e.sourceIeeeAddr) &&
145+
nodes.includes(e.targetIeeeAddr)
144146
),
145147
d => d.sid + d.tid,
146148
d => d.sourceIeeeAddr + d.targetIeeeAddr,

0 commit comments

Comments
 (0)