From 9fc81542372cfd2b92372ee9267b733ab1864824 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 28 Mar 2023 23:47:20 +0800 Subject: [PATCH] Try fix non-logged-in bug --- src/components/menu.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/menu.jsx b/src/components/menu.jsx index ffe5ea9f..7e36ca83 100644 --- a/src/components/menu.jsx +++ b/src/components/menu.jsx @@ -13,7 +13,7 @@ import MenuLink from './menu-link'; function NavMenu(props) { const snapStates = useSnapshot(states); const { instance, authenticated } = api(); - const accounts = store.local.getJSON('accounts'); + const accounts = store.local.getJSON('accounts') || []; const currentAccount = accounts.find( (account) => account.info.id === store.session.get('currentAccount'), );