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>
This commit is contained in:
parent
efb8c89433
commit
7e425ce939
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue