mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 18:07:57 +00:00
Return default navbar state when there is no local storage value set
This commit is contained in:
parent
2e3328fce0
commit
ab21d1f964
@ -22,7 +22,9 @@ export type LocalState = {
|
||||
* Loads a persisted object from the local browser storage.
|
||||
*/
|
||||
const loadLocalState = () => {
|
||||
return JSON.parse(localStorage.getItem(LOCAL_STATE_KEY) || '{}') as LocalState;
|
||||
return JSON.parse(
|
||||
localStorage.getItem(LOCAL_STATE_KEY) || `{"state" : ${NavBarStateType.Collapsed}}`,
|
||||
) as LocalState;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user