diff --git a/src/livecodes/storage/simple-storage.ts b/src/livecodes/storage/simple-storage.ts index 22cee4a0f9..50550ba778 100644 --- a/src/livecodes/storage/simple-storage.ts +++ b/src/livecodes/storage/simple-storage.ts @@ -22,8 +22,12 @@ export const createSimpleStorage = (name: StoreName, isEmbed: boolean): Simpl }; const setValue = (value: T | null) => { - window.localStorage.setItem(name, JSON.stringify(value)); - notifyPub(); + try { + window.localStorage.setItem(name, JSON.stringify(value)); + notifyPub(); + } catch { + // exceeded quota + } }; const getValue = (): T | null => {