File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,13 +28,14 @@ function initSpotify() {
2828
2929 spotifyApi . setAccessToken ( globalThis . Spotify . accessToken ) ;
3030 spotifyApi . setRefreshToken ( globalThis . Spotify . refreshToken ) ;
31-
32- if ( expirationDate <= new Date ( ) || ! globalThis . Spotify . accessToken ) {
33- console . log ( "Refreshing token" )
34- await refreshAccessToken ( ) ;
35- } else {
36- console . log ( "Token is good: [" + expirationDate + "], vs, [" + new Date ( ) + "]" ) ;
37- }
31+ await refreshAccessToken ( ) ;
32+
33+ // if (expirationDate <= new Date() || !globalThis.Spotify.accessToken) {
34+ // console.log("Refreshing token")
35+ // await refreshAccessToken();
36+ // } else {
37+ // console.log("Token is good: [" + expirationDate + "], vs, [" + new Date() + "]");
38+ // }
3839 resolve ( { } ) ;
3940 } catch ( error ) {
4041 console . error ( error ) ;
You can’t perform that action at this time.
0 commit comments