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;