Skip to content

Commit

Permalink
fix: nullify Player data when item is null
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri authored Aug 31, 2023
1 parent ab791b1 commit 80fea46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,10 @@ window.Spicetify = {

setInterval(() => {
if (objectsAreEqual(Spicetify.Platform.PlayerAPI._state, playerState.cache)) return;
if (!Spicetify.Platform.PlayerAPI._state.item) {
Spicetify.Player.data = null;
return;
}

playerState.current = Spicetify.Platform.PlayerAPI._state;
Spicetify.Player.data = playerState.current;
Expand Down

0 comments on commit 80fea46

Please sign in to comment.