fix: favorites not working when client id or client secret are empty in settings

This commit is contained in:
Roberto Tonino 2021-08-11 12:15:40 +02:00
parent b06597d9f2
commit 33d9920eae

View File

@ -34,6 +34,11 @@ const refreshFavorites = ({ isInitial = false }) => {
spotifyUser: store.getters.getSpotifyUser.id spotifyUser: store.getters.getSpotifyUser.id
}) })
.then(spotifyPlaylists => { .then(spotifyPlaylists => {
if (spotifyPlaylists.error === 'spotifyNotEnabled') {
favoriteSpotifyPlaylists.value = []
return
}
favoriteSpotifyPlaylists.value = spotifyPlaylists favoriteSpotifyPlaylists.value = spotifyPlaylists
}) })
.catch(console.error) .catch(console.error)