File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,11 @@ <h2 class="text-xl font-bold mb-4 text-black dark:text-white">
172172
173173 window . onSpotifyWebPlaybackSDKReady = ( ) => {
174174 const token = localStorage . getItem ( 'spotify_access_token' ) || getHashParams ( ) . access_token ;
175- if ( token ) initializePlayer ( token ) ;
175+ if ( token ) {
176+ initializePlayer ( token ) ;
177+ } else {
178+ startAuth ( ) ;
179+ }
176180 } ;
177181
178182 function startAuth ( ) {
@@ -254,13 +258,6 @@ <h3 class="text-lg font-semibold">${track.name}</h3>
254258 } ) ;
255259 document . getElementById ( 'createQRButton' ) . onclick = showPlaylistModal ;
256260 updateButtonIcon ( ) ;
257-
258- const token = localStorage . getItem ( 'spotify_access_token' ) || getHashParams ( ) . access_token ;
259- if ( token ) {
260- initializePlayer ( token ) ;
261- } else {
262- startAuth ( ) ;
263- }
264261 } ) ;
265262
266263 async function processPlaylist ( ) {
You can’t perform that action at this time.
0 commit comments