Permalink
Browse files

fix(fetchClientConfig): do not break promises chain

As discussed, this will be the correct way of fixing it
  • Loading branch information...
MaximBalaganskiy committed Jun 13, 2018
1 parent 9dd909b commit c1cd0f28dd40c16435c2e5b3831c566292c81a61
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/fetchClientConfig.js
@@ -70,7 +70,7 @@ export class FetchConfig {
}
// refresh token and try again
return this.authService.updateToken().then(() => {
return resolve(this.authService.updateToken().then(() => {
let token = this.authService.getAccessToken();
if (this.config.authTokenType) {
@@ -80,8 +80,7 @@ export class FetchConfig {
request.headers.set(this.config.authHeader, token);
return this.httpClient.fetch(request).then(resolve);
})
.catch(e => reject(e));
}));
});
}
};

0 comments on commit c1cd0f2

Please sign in to comment.