diff --git a/src/Logic/Web/LocalStorageSource.ts b/src/Logic/Web/LocalStorageSource.ts index 872dcb3716..19fdb19a77 100644 --- a/src/Logic/Web/LocalStorageSource.ts +++ b/src/Logic/Web/LocalStorageSource.ts @@ -42,19 +42,21 @@ export class LocalStorageSource { } const source = new UIEventSource(saved ?? defaultValue, "localstorage:" + key) - source.addCallback((data) => { - if (data === undefined || data === "" || data === null) { - localStorage.removeItem(key) - return - } - try { - localStorage.setItem(key, data) - } catch (e) { - // Probably exceeded the quota with this item! - // Let's nuke everything - localStorage.clear() - } - }) + if(!Utils.runningFromConsole){ + source.addCallback((data) => { + if (data === undefined || data === "" || data === null) { + localStorage.removeItem(key) + return + } + try { + localStorage.setItem(key, data) + } catch (e) { + // Probably exceeded the quota with this item! + // Let's nuke everything + localStorage.clear() + } + }) + } LocalStorageSource._cache[key] = source return source }