-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update api.js for fix #64 #96
Update api.js for fix #64 #96
Conversation
src/utils/api.js
Outdated
@@ -13,19 +13,26 @@ export default { | |||
oauthToken: '', | |||
spaceId: null, | |||
region: '', | |||
client: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @roberto-butti I would not set it to false since the property is meant to be an object. It's better to set it to null initially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @alvarosabu , thank you for your feedback. I adapted the code according to your feedback
src/utils/api.js
Outdated
...DEFAULT_AGENT | ||
} | ||
}, this.apiSwitcher(region)) | ||
if (this.client === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (this.client === false) { | |
if (!this.client) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hola @alvarosabu , thank you for your feedback. I adapted the code according to your feedback
Walking through previous issues and PRs i see that there are some related contributions and feedback from other developers.
I tested it with pull-components, push-components, sync , import At the moment, the check is made on the instance of the client. Probably in the future, if we need more client instances we should evaluate to check tokens etc. (when we check the existence of the client instance) |
Closed in favor of #72 |
Pull request type
How to test this PR
THe issue fixed by this PR is well documented here #64
it closes #64