From 2df1acf53286c7cf82a8f22a72a051639b2e46f1 Mon Sep 17 00:00:00 2001 From: Hans-Wilhelm Warlo <5417271+hanswilw@users.noreply.github.com> Date: Fri, 22 Nov 2019 07:48:11 +0100 Subject: [PATCH] Return false when mappedDevice is falsy (#2383) --- lib/extension/deviceReport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/deviceReport.js b/lib/extension/deviceReport.js index 897f058ca..d1635a917 100644 --- a/lib/extension/deviceReport.js +++ b/lib/extension/deviceReport.js @@ -97,7 +97,7 @@ class DeviceReport extends BaseExtension { } shouldSetupReporting(mappedDevice, device, messageType) { - if (!device) return false; + if (!device || !mappedDevice) return false; // Handle messages of type endDeviceAnnce and devIncoming. // This message is typically send when a device comes online after being powered off