🐛 (spotify) don't redirect if no env variable is set

This commit is contained in:
2021-02-28 17:26:57 +01:00
parent 7039c86b4f
commit 7cfc7b6696

View File

@@ -17,6 +17,9 @@ const getHeaders = (token: string) => ({
}) })
export const redirectToSpotifyConnect = () => { export const redirectToSpotifyConnect = () => {
if (!process.env.VUE_APP_SPOTIFY_CLIENT_ID) {
return
}
const authorizeURL = new URL('https://accounts.spotify.com/authorize') const authorizeURL = new URL('https://accounts.spotify.com/authorize')
authorizeURL.searchParams.append( authorizeURL.searchParams.append(
'client_id', 'client_id',