Skip to content

Commit

Permalink
Added check for null
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Jun 13, 2024
1 parent 3c06394 commit a00ddc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/framework/GuiMessageBroker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class GuiMessageBroker {
// For now, persistent states are only stored in localStorage
// However, in the future, we may want to store at least some of them in a database on the server
const stateValue = this._storedValues.get(state);
if (stateValue === undefined) {
if (stateValue === undefined || stateValue === null) {
return;
}
localStorage.setItem(state, JSON.stringify(stateValue));
Expand Down

0 comments on commit a00ddc9

Please sign in to comment.