Skip to content

Commit

Permalink
handle UI local storage structure changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-tspencer committed May 7, 2024
1 parent ed0e9db commit 6def8aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/data/ui/ui-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ export class UIState {
providedIn: 'root',
})
export class UIDataService {
private uiState = JSON.parse(localStorage.getItem('uiState')) || new UIState();
private uiState = new UIState();

constructor() {}
constructor() {
const savedState = JSON.parse(localStorage.getItem('uiState'));
this.uiState = Object.assign(this.uiState, savedState);
}

//
// Item Expansion
Expand Down

0 comments on commit 6def8aa

Please sign in to comment.