From f3dd187df7d41621ee215de35d3908ff93771105 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sat, 11 Feb 2023 09:53:08 +0100 Subject: [PATCH] useEditorData fix --- packages/web/src/query/useEditorData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/query/useEditorData.ts b/packages/web/src/query/useEditorData.ts index e486382b..5fa7a25b 100644 --- a/packages/web/src/query/useEditorData.ts +++ b/packages/web/src/query/useEditorData.ts @@ -72,7 +72,7 @@ export default function useEditorData({ tabid, reloadToken = 0, loadFromArgs = n if (onInitialData) onInitialData(initFallback); value = initFallback; // move to local forage - await localforage.setItem(localStorageKey, JSON.stringify(initFallback)); + await localforage.setItem(localStorageKey, initFallback); localStorage.removeItem(localStorageKey); } else { const init = await localforage.getItem(localStorageKey);