mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 14:36:15 -04:00
wip
This commit is contained in:
parent
44b9a39927
commit
419bd8e26b
3 changed files with 22 additions and 2 deletions
|
@ -140,4 +140,16 @@ migrate("set_breakout_71_unlocked_levels" + _appVersion, () => {
|
|||
);
|
||||
});
|
||||
|
||||
migrate('clean_ls', ()=>{
|
||||
for (let key in localStorage) {
|
||||
try {
|
||||
JSON.parse(localStorage.getItem(key) || "null");
|
||||
} catch (e) {
|
||||
localStorage.removeItem(key)
|
||||
console.warn('Removed invalid key '+key,e);
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
afterMigration();
|
||||
|
|
|
@ -14,7 +14,7 @@ try {
|
|||
warnedUserAboutLSIssue = true;
|
||||
toast(`Storage issue : ${(e as Error)?.message}`);
|
||||
}
|
||||
console.warn(e);
|
||||
console.warn('Reading '+key,e);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue