Skip to content
This repository has been archived by the owner on Oct 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #55 from cubic-js/development
Browse files Browse the repository at this point in the history
Fix issue where setAccessToken wouldn't wait for the initial connection.
  • Loading branch information
Kaptard authored Jul 17, 2018
2 parents 8be53d4 + 85db0f4 commit 057e936
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"cubic-api": "1.2.1",
"cubic-auth": "1.1.0",
"cubic-client": "^1.1.0",
"cubic-core": "1.1.1",
"cubic-core": "1.1.2",
"cubic-loader": "1.1.1",
"eslint": "^5.1.0",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.13.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-node": "^7.0.0",
"eslint-plugin-promise": "^3.8.0",
"eslint-plugin-standard": "^3.1.0",
"mocha": "^5.2.0",
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class Client {
* Manually set access token.
*/
async setAccessToken (token) {
await this.connecting
this.connection.auth.access_token = token
await this.connection.reload()
}
Expand Down

0 comments on commit 057e936

Please sign in to comment.