mirror of
https://github.com/danbulant/heaventaker
synced 2026-05-19 04:18:57 +00:00
I hate NaNs
This commit is contained in:
parent
02045b6a1d
commit
85831d8d6b
1 changed files with 1 additions and 1 deletions
|
|
@ -6,6 +6,6 @@ gameActive.subscribe(t => {
|
|||
localStorage.setItem("game-active", t ? 1 : 0);
|
||||
});
|
||||
const startPage = localStorage.getItem("dialog-page");
|
||||
const startPageIndex = Number(startPage) !== NaN ? Number(startPage) : dialog.findIndex(t => t.name === startPage);
|
||||
const startPageIndex = !isNaN(Number(startPage)) ? Number(startPage) : dialog.findIndex(t => t.name === startPage);
|
||||
export const page = writable(startPageIndex !== -1 ? startPageIndex : 0);
|
||||
export const menuActive = writable(false);
|
||||
Loading…
Reference in a new issue