This commit is contained in:
Renan LE CARO 2025-04-06 15:38:30 +02:00
parent 2f51f83514
commit 42abc6bc01
25 changed files with 1514 additions and 1328 deletions

View file

@ -41,17 +41,14 @@ migrate("remove_long_and_creative_mode_data", () => {
localStorage.getItem("breakout_71_runs_history") || "[]",
) as RunHistoryItem[];
let cleaned=runsHistory.filter(r=> {
if('mode' in r){
if(r.mode !== 'short'){
return false
let cleaned = runsHistory.filter((r) => {
if ("mode" in r) {
if (r.mode !== "short") {
return false;
}
}
return true
})
if(cleaned.length!==runsHistory.length)
localStorage.setItem(
"breakout_71_runs_history",
JSON.stringify(cleaned),
);
return true;
});
if (cleaned.length !== runsHistory.length)
localStorage.setItem("breakout_71_runs_history", JSON.stringify(cleaned));
});