Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ybriker committed Feb 2, 2025
1 parent 4ff817e commit fd2ff2a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/setting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ AppSettingsPage({
setState(props) {
console.log('setState', props);
this.state.props = props;
const storedAuthData = JSON.parse(
props.settingsStorage.getItem('googleAuthData'),
);
if (storedAuthData) {
try {
const storedAuthData = JSON.parse(
props.settingsStorage.getItem('googleAuthData'),
);
this.state.googleAuthData = storedAuthData;
} catch (e) {
console.error('Error parsing googleAuthData', e);
console.error(
'googleAuthData:',
props.settingsStorage.getItem('googleAuthData'),
);
}
if (this.isTokenExpired() || !this.state.googleAuthData) {
this.state.googleAuthData = null;
Expand Down

0 comments on commit fd2ff2a

Please sign in to comment.