Update SpotifyControls.plugin.js

This commit is contained in:
Mirco Wittrien 2020-11-16 10:06:21 +01:00
parent 298754d8b6
commit 13f7f75613
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ module.exports = (_ => {
authorization: `Bearer ${socket.accessToken}`
}
}, (error, response, result) => {
if (response.statusCode == 401) {
if (response && response.statusCode == 401) {
BDFDB.LibraryModules.SpotifyUtils.getAccessToken(socket.accountId).then(promiseResult => {
let newSocketDevice = BDFDB.LibraryModules.SpotifyTrackUtils.getActiveSocketAndDevice();
this.request(newSocketDevice.socket, newSocketDevice.device, type, data).then(_ => {