Skip to content

Commit

Permalink
fix: check for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
omer-biz committed Sep 11, 2024
1 parent 7b971e9 commit 08058c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/scripts/shareButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function tryLoadFromShareLink(codeMirror) {
"textarea.editor-input-text",
)!;
inputEditor.value = decoded["input"];
localStorage.setItem("last-selected-rule", decoded["selectedRule"]);
if (decoded["selectedRule"]) {
localStorage.setItem("last-selected-rule", decoded["selectedRule"]);
}
}
}

Expand Down

0 comments on commit 08058c4

Please sign in to comment.