useEditorData fix

This commit is contained in:
Jan Prochazka 2023-02-11 09:53:08 +01:00
parent b5f504f3b1
commit f3dd187df7

View File

@ -72,7 +72,7 @@ export default function useEditorData({ tabid, reloadToken = 0, loadFromArgs = n
if (onInitialData) onInitialData(initFallback); if (onInitialData) onInitialData(initFallback);
value = initFallback; value = initFallback;
// move to local forage // move to local forage
await localforage.setItem(localStorageKey, JSON.stringify(initFallback)); await localforage.setItem(localStorageKey, initFallback);
localStorage.removeItem(localStorageKey); localStorage.removeItem(localStorageKey);
} else { } else {
const init = await localforage.getItem(localStorageKey); const init = await localforage.getItem(localStorageKey);