Skip to content

Commit

Permalink
Fix access_token of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
André Coelho committed Apr 3, 2017
1 parent ee05e4b commit f1bd93c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/providers/oauth-token-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ function OAuthTokenProvider() {
*/

getAccessToken() {
return this.getToken() ? this.getToken().access_token : undefined;
const { access_token } = this.getToken() || {};

return access_token;
}

/**
Expand Down

0 comments on commit f1bd93c

Please sign in to comment.