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
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m20s
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user