Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(fetchClientConfig): do not break promises chain
Browse files Browse the repository at this point in the history
As discussed, this will be the correct way of fixing it
  • Loading branch information
MaximBalaganskiy committed Jun 13, 2018
1 parent 9dd909b commit c1cd0f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/fetchClientConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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));
}));
});
}
};
Expand Down

0 comments on commit c1cd0f2

Please sign in to comment.