We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
charAt
substr
1 parent a7ea4a4 commit e35acfeCopy full SHA for e35acfe
src/providers/oauth-token-provider.js
@@ -73,11 +73,14 @@ function OAuthTokenProvider() {
73
*/
74
75
getAuthorizationHeader() {
76
- if (!(this.getTokenType() && this.getAccessToken())) {
+ const tokenType = this.getTokenType();
77
+ const accessToken = this.getAccessToken();
78
+
79
+ if (!tokenType || !accessToken) {
80
return;
81
}
82
- return `${this.getTokenType().charAt(0).toUpperCase() + this.getTokenType().substr(1)} ${this.getAccessToken()}`;
83
+ return `${tokenType.charAt(0).toUpperCase() + tokenType.substr(1)} ${accessToken}`;
84
85
86
/**
0 commit comments