1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-28 17:27:50 +01:00

null check refresh promise

This commit is contained in:
Kyle Spearrin 2017-10-19 21:20:32 -04:00
parent c3653577c6
commit 805393b4db

View File

@ -49,7 +49,12 @@ angular
return token;
}
refreshPromise = authService.refreshAccessToken().then(function (newToken) {
var p = authService.refreshAccessToken();
if (!p) {
return;
}
refreshPromise = p.then(function (newToken) {
refreshPromise = null;
return newToken || token;
});