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
parent
efb8c89433
commit
7e425ce939
|
@ -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 New Issue