Skip to content

Commit ac58c41

Browse files
authored
Add files via upload
1 parent c6381a3 commit ac58c41

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

app.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,8 +1343,14 @@ function loadState() {
13431343
const old = localStorage.getItem(key);
13441344
if (old) return migrateOldState(JSON.parse(old));
13451345
}
1346-
} catch {
1347-
localStorage.removeItem(STORAGE_KEY);
1346+
} catch (error) {
1347+
const saved = localStorage.getItem(STORAGE_KEY);
1348+
if (saved) {
1349+
try {
1350+
localStorage.setItem(`${STORAGE_KEY}-recovery-${Date.now()}`, saved);
1351+
} catch {}
1352+
}
1353+
console.warn("Failed to load local data; kept a recovery copy.", error);
13481354
}
13491355
return structuredClone(defaultState);
13501356
}

service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const VERSION = "126";
1+
const VERSION = "127";
22
const CACHE_NAME = `free-knit-workbench-v${VERSION}`;
33
const ASSETS = [
44
"./",

0 commit comments

Comments
 (0)