Skip to content

Commit

Permalink
fix: handle google drive error response (deriv-com#13058)
Browse files Browse the repository at this point in the history
  • Loading branch information
shafin-deriv authored Jan 23, 2024
1 parent 36b4b9e commit b90a3a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/bot-web-ui/src/stores/google-drive-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ export default class GoogleDriveStore {
client_id: this.client_id,
scope: this.scope,
callback: response => {
this.access_token = response.access_token;
this.updateSigninStatus(true);
localStorage.setItem('google_access_token', response.access_token);
if (response?.access_token && !response?.error) {
this.access_token = response.access_token;
this.updateSigninStatus(true);
localStorage.setItem('google_access_token', response.access_token);
}
},
});
};
Expand Down

0 comments on commit b90a3a8

Please sign in to comment.