Empty object if nothing saved

This isn't nice but I'll rework this soon anyway

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-03-26 08:15:35 +01:00
parent efb8c89433
commit 7e425ce939
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
// view last selected room from space
const spaceId = space?.roomId || LAST_VIEWED_ROOMS_HOME;
const lastViewedRooms = JSON.parse(window.localStorage.getItem(LAST_VIEWED_ROOMS));
const lastViewedRooms = JSON.parse(window.localStorage.getItem(LAST_VIEWED_ROOMS)) || {};
const roomId = lastViewedRooms[spaceId];
if (roomId) {