Browse Source

Add undefined check when decrementing song (#230)

master
jeffvli 3 years ago
parent
commit
809e8ab1c7
  1. 4
      src/redux/playQueueSlice.ts

4
src/redux/playQueueSlice.ts

@ -612,8 +612,8 @@ const playQueueSlice = createSlice({
} }
state.current = { ...state[currentEntry][state.currentIndex] }; state.current = { ...state[currentEntry][state.currentIndex] };
state.currentSongId = state[currentEntry][state.currentIndex].id; state.currentSongId = state[currentEntry][state.currentIndex]?.id;
state.currentSongUniqueId = state[currentEntry][state.currentIndex].uniqueId; state.currentSongUniqueId = state[currentEntry][state.currentIndex]?.uniqueId;
} }
}, },

Loading…
Cancel
Save