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
1 changed files with 5 additions and 0 deletions

View File

@ -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)