diff --git a/src/app.js b/src/app.js index 3594431..8671eae 100644 --- a/src/app.js +++ b/src/app.js @@ -445,7 +445,7 @@ class App{ }); } - get times() {return JSON.parse(localStorage.times||'') || 0;} + get times() {return JSON.parse(localStorage.times||'0') || 0;} set times(v) {localStorage.times = JSON.stringify(parseInt(v) || 0)}; } diff --git a/src/life.js b/src/life.js index 2ccb3a6..291e015 100644 --- a/src/life.js +++ b/src/life.js @@ -99,7 +99,7 @@ class Life { } talentRandom() { - return this.#talent.talentRandom(JSON.parse(localStorage.extendTalent||'')); + return this.#talent.talentRandom(JSON.parse(localStorage.extendTalent||'null')); } talentExtend(talentId) {