From 33d9920eaeee05f7a1c2231d3eb0ccceddfb557e Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Wed, 11 Aug 2021 12:15:40 +0200 Subject: [PATCH] fix: favorites not working when client id or client secret are empty in settings --- src/use/favorites.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/use/favorites.js b/src/use/favorites.js index 245b7a8..fac786e 100644 --- a/src/use/favorites.js +++ b/src/use/favorites.js @@ -34,6 +34,11 @@ const refreshFavorites = ({ isInitial = false }) => { spotifyUser: store.getters.getSpotifyUser.id }) .then(spotifyPlaylists => { + if (spotifyPlaylists.error === 'spotifyNotEnabled') { + favoriteSpotifyPlaylists.value = [] + return + } + favoriteSpotifyPlaylists.value = spotifyPlaylists }) .catch(console.error)