Skip to content

Commit

Permalink
Fix TypeError when there is no next item in the queue (#398)
Browse files Browse the repository at this point in the history
fix TypeError when there is no next item in the queue
  • Loading branch information
marcelveldt committed Jul 6, 2022
1 parent 0871e84 commit 9f98c7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music_assistant/models/player_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def next_item(self) -> QueueItem | None:
try:
next_index = self.get_next_index(self._current_index)
return self._items[next_index]
except IndexError:
except (IndexError, TypeError):
return None

def get_item(self, index: int) -> QueueItem | None:
Expand Down

0 comments on commit 9f98c7e

Please sign in to comment.