From aa5d695e4bafea8fab2658f4724059ad664fb394 Mon Sep 17 00:00:00 2001 From: jonferreira Date: Thu, 9 Nov 2023 14:04:23 +0000 Subject: [PATCH] Update alexa-remote-ext.js null check --- lib/alexa-remote-ext.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/alexa-remote-ext.js b/lib/alexa-remote-ext.js index ea31c42..8c20652 100644 --- a/lib/alexa-remote-ext.js +++ b/lib/alexa-remote-ext.js @@ -512,7 +512,7 @@ class AlexaRemoteExt extends AlexaRemote { } async initDevicesExt() { return this.getDevicesPromise().then(response => { - this.deviceByIdExt = new Map(response.devices.map(o => [o.serialNumber, o])); + this.deviceByIdExt = new Map(response.devices?.map(o => [o.serialNumber, o])); this._deviceChange(); }); } @@ -1162,4 +1162,4 @@ class AlexaRemoteExt extends AlexaRemote { } } -module.exports = AlexaRemoteExt; \ No newline at end of file +module.exports = AlexaRemoteExt;