diff --git a/package.json b/package.json index 78a0cae..3dae4d0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "Denon TV", "name": "homebridge-denon-tv", - "version": "4.12.9", + "version": "4.12.10", "description": "Homebridge plugin to control Denon/Marantz AV Receivers.", "license": "MIT", "author": "grzegorz914", diff --git a/src/denon.js b/src/denon.js index 0dc895e..76c922e 100644 --- a/src/denon.js +++ b/src/denon.js @@ -358,7 +358,7 @@ class DENON extends EventEmitter { }; //schortcuts - const deviceSchortcuts = getInputsFromDevice && supportShortcut ? zoneCapabilities.ShortcutControl.EntryList.Shortcut : []; + const deviceSchortcuts = getInputsFromDevice && supportShortcut && Array.isArray(zoneCapabilities.ShortcutControl.EntryList.Shortcut) ? zoneCapabilities.ShortcutControl.EntryList.Shortcut : []; for (const shortcut of deviceSchortcuts) { const category = shortcut.Category; //1, 2, 3 Quick/Smart Select, 4 Inputs, 5 Sound Mode const shortcutName = shortcut.DispName; @@ -371,7 +371,7 @@ class DENON extends EventEmitter { }; //favorites - const deviceFavorites = getFavoritesFromDevice && supportFavorites ? devInfo.DeviceCapabilities.Operation.Favorites : []; + const deviceFavorites = getFavoritesFromDevice && supportFavorites && Array.isArray(devInfo.DeviceCapabilities.Operation.Favorites) ? devInfo.DeviceCapabilities.Operation.Favorites : []; for (const favorite of deviceFavorites) { const favoriteName = favorite.DispName; const favoriteReference = favorite.FuncName;