desloppify: fix 34 unused imports/vars, debug logs, and code quality issues
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m20s

This commit is contained in:
2026-05-26 02:35:02 +02:00
parent fdc636faaa
commit 518961299a
23 changed files with 30 additions and 43 deletions
-7
View File
@@ -18,7 +18,6 @@ export function createSafeStorage(): any {
if (str === null) return null;
return str;
} catch (error) {
console.warn(`[persist] Failed to read "${name}" from localStorage:`, error);
try {
localStorage.removeItem(name);
} catch {
@@ -31,18 +30,12 @@ export function createSafeStorage(): any {
try {
localStorage.setItem(name, JSON.stringify(value));
} catch (error) {
if (error instanceof DOMException && error.name === 'QuotaExceededError') {
console.warn(`[persist] localStorage quota exceeded for "${name}". State will not persist this tick.`);
} else {
console.warn(`[persist] Failed to write "${name}" to localStorage:`, error);
}
}
},
removeItem: (name: string): void => {
try {
localStorage.removeItem(name);
} catch (error) {
console.warn(`[persist] Failed to remove "${name}" from localStorage:`, error);
}
},
};