From 3b60a907c89cafa0585595d53ad9db16b30ee191 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 3 Mar 2020 21:19:00 +0100 Subject: [PATCH] Fix error on OTA update message without mapped device. --- lib/extension/otaUpdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/otaUpdate.js b/lib/extension/otaUpdate.js index 3c1913c08..33e4e2daa 100644 --- a/lib/extension/otaUpdate.js +++ b/lib/extension/otaUpdate.js @@ -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