Try fix non-logged-in bug

This commit is contained in:
Lim Chee Aun 2023-03-28 23:47:20 +08:00
parent bf76728528
commit 9fc8154237

View file

@ -13,7 +13,7 @@ import MenuLink from './menu-link';
function NavMenu(props) { function NavMenu(props) {
const snapStates = useSnapshot(states); const snapStates = useSnapshot(states);
const { instance, authenticated } = api(); const { instance, authenticated } = api();
const accounts = store.local.getJSON('accounts'); const accounts = store.local.getJSON('accounts') || [];
const currentAccount = accounts.find( const currentAccount = accounts.find(
(account) => account.info.id === store.session.get('currentAccount'), (account) => account.info.id === store.session.get('currentAccount'),
); );