0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 22:42:41 +00:00
Fix save location logic
This commit is contained in:
Trevor Buckner
2023-08-18 07:20:01 -04:00
committed by GitHub

View File

@@ -35,7 +35,7 @@ const AccountPage = createClass({
if(!this.state.saveLocation && this.props.uiItems.username) {
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
let saveLocation = window.localStorage.getItem(SAVEKEY);
saveLocation = saveLocation ?? this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY';
saveLocation = saveLocation ?? (this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY');
this.makeActive(saveLocation);
}
},