mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-23 14:22:38 +00:00
Fix error when device does not exists. https://github.com/Koenkk/zigbee2mqtt/issues/8836
This commit is contained in:
1 parent
89dea86b3a
commit
59dd6e6bff
1 file changed
+1
-1
+1
-1
@@ -290,7 +290,7 @@ export default class Zigbee {
|
||||
|
||||
deviceByNetworkAddress(networkAddress: number): Device {
|
||||
const device = this.herdsman.getDeviceByNetworkAddress(networkAddress);
|
||||
return this.addDeviceToResolvedEntitiesLookup(device.ieeeAddr);
|
||||
return device && this.addDeviceToResolvedEntitiesLookup(device.ieeeAddr);
|
||||
}
|
||||
|
||||
// TODO remove all legacy below
|
||||
|
||||
Reference in new issue
Block a user