Skip to content

Commit

Permalink
Fix an issue trying to play children of empty groups
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Apr 20, 2024
1 parent 0bb0761 commit b8a9a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PLAY_HANDLERS = {
*/
'bridge.types.group': item => {
if (!item?.data?.playMode || item?.data?.playMode === GROUP_PLAY_MODES.all) {
for (const child of item.children) {
for (const child of (item?.children || [])) {
bridge.items.playItem(child)
}
}
Expand Down Expand Up @@ -59,7 +59,7 @@ const STOP_HANDLERS = {
on the group's play mode
*/
'bridge.types.group': item => {
for (const child of item.children) {
for (const child of (item?.children || [])) {
bridge.items.stopItem(child)
}
},
Expand Down

0 comments on commit b8a9a0c

Please sign in to comment.