diff --git a/src/Logic/Web/IdbLocalStorage.ts b/src/Logic/Web/IdbLocalStorage.ts index ec417a1f8..9411d1e3b 100644 --- a/src/Logic/Web/IdbLocalStorage.ts +++ b/src/Logic/Web/IdbLocalStorage.ts @@ -10,7 +10,7 @@ export class IdbLocalStorage { public static Get( key: string, - options?: { defaultValue?: T; whenLoaded?: (t: T | null) => void } + options?: { defaultValue?: T; whenLoaded?: (t: T | null) => void }, ): UIEventSource { if (IdbLocalStorage._sourceCache[key] !== undefined) { return IdbLocalStorage._sourceCache[key] @@ -39,11 +39,14 @@ export class IdbLocalStorage { } public static SetDirectly(key: string, value: any): Promise { - const copy = Utils.Clone(value) - return idb.set(key, copy) + return idb.set(key, value) } static GetDirectly(key: string): Promise { return idb.get(key) } + + static clearAll() { + return idb.clear() + } }