json tab, json dark mode style fix

This commit is contained in:
Jan Prochazka
2021-12-02 11:02:03 +01:00
parent 4751e4930e
commit 7522f87066
7 changed files with 99 additions and 23 deletions

View File

@@ -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, initFallback);
await localforage.setItem(localStorageKey, JSON.stringify(initFallback));
localStorage.removeItem(localStorageKey);
} else {
const init = await localforage.getItem(localStorageKey);