Skip to content

Commit

Permalink
fix #256
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Apr 21, 2024
1 parent dfa6a3c commit c87c44c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/denon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit c87c44c

Please sign in to comment.