0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 02:42:39 +00:00

Correct check for case of user not being logged in

This commit is contained in:
G.Ambatte
2023-08-21 14:56:44 +12:00
parent 355b8ac78f
commit 186809008c

View File

@@ -56,7 +56,7 @@ const NewPage = createClass({
const styleStorage = localStorage.getItem(STYLEKEY);
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${global.account.username}`;
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${global.account?.username || ''}`;
const saveStorage = localStorage.getItem(SAVEKEY) || 'HOMEBREWERY';
brew.text = brewStorage ?? brew.text;