This commit is contained in:
Vick Scarlet
2021-08-19 09:21:28 +08:00
parent df8ec45e90
commit 58b5a57721
2 changed files with 4 additions and 4 deletions

View File

@@ -445,8 +445,8 @@ class App{
});
}
get times() {return localStorage.times || 0;}
set times(v) {localStorage.times = parseInt(v) || 0};
get times() {return JSON.parse(localStorage.times||'') || 0;}
set times(v) {localStorage.times = JSON.stringify(parseInt(v) || 0)};
}

View File

@@ -99,11 +99,11 @@ class Life {
}
talentRandom() {
return this.#talent.talentRandom(localStorage.extendTalent);
return this.#talent.talentRandom(JSON.parse(localStorage.extendTalent||''));
}
talentExtend(talentId) {
localStorage.extendTalent = talentId;
localStorage.extendTalent = JSON.stringify(talentId);
}
getRecord() {