mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-25 12:09:53 +00:00
Fix error on OTA update message without mapped device.
This commit is contained in:
@@ -20,7 +20,7 @@ class OTAUpdate extends BaseExtension {
|
||||
async onZigbeeEvent(type, data, mappedDevice, settingsDevice) {
|
||||
if (data.type !== 'commandQueryNextImageRequest') return;
|
||||
|
||||
const supportsOTA = mappedDevice.hasOwnProperty('ota');
|
||||
const supportsOTA = mappedDevice && mappedDevice.hasOwnProperty('ota');
|
||||
if (supportsOTA) {
|
||||
// When a device does a next image request, it will usually do it a few times after each other
|
||||
// with only 10 - 60 seconds inbetween. It doesn' make sense to check for a new update
|
||||
|
||||
Reference in New Issue
Block a user