diff options
| author | Jordan Nguy <[email protected]> | 2021-09-25 17:50:10 -0700 |
|---|---|---|
| committer | Jordan Nguy <[email protected]> | 2021-09-25 17:50:10 -0700 |
| commit | 7e14084163f1f022e7337ee25b48ac9d97cd5f52 (patch) | |
| tree | d36515667bd282042b2ffd8be98f90c07a57f9ef /src | |
| parent | c23f04ba5aab3734189f9dbd213d373249348a79 (diff) | |
| download | muse-7e14084163f1f022e7337ee25b48ac9d97cd5f52.tar.xz muse-7e14084163f1f022e7337ee25b48ac9d97cd5f52.zip | |
Binds recursive call function to keep original scope
Diffstat (limited to 'src')
| -rw-r--r-- | src/services/third-party.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/services/third-party.ts b/src/services/third-party.ts index 6eaf644..0924b80 100644 --- a/src/services/third-party.ts +++ b/src/services/third-party.ts @@ -33,6 +33,6 @@ export default class ThirdParty { const auth = await this.spotify.clientCredentialsGrant(); this.spotify.setAccessToken(auth.body.access_token); - this.spotifyTokenTimerId = setTimeout(this.refreshSpotifyToken, (auth.body.expires_in / 2) * 1000); + this.spotifyTokenTimerId = setTimeout(this.refreshSpotifyToken.bind(this), (auth.body.expires_in / 2) * 1000); } } |
