diff --git a/components/src/stores/base.context.ts b/components/src/stores/base.context.ts index 6d1136d34..bf37d634d 100644 --- a/components/src/stores/base.context.ts +++ b/components/src/stores/base.context.ts @@ -54,10 +54,13 @@ export function useBaseContext(): BaseContext { useEffect(() => { if (root) return; - attemptLoadAdapterFromIndexedDb().then((adapter) => { - if (!adapter) return; - setLocalFs(adapter); - }); + + if ("showDirectoryPicker" in window) { + attemptLoadAdapterFromIndexedDb().then((adapter) => { + if (!adapter) return; + setLocalFs(adapter); + }); + } }, [root, setLocalFs]); const canUpgradeFs = `showDirectoryPicker` in window; diff --git a/web/src/App.tsx b/web/src/App.tsx index f51d7b0b7..8964f9ad4 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -47,7 +47,7 @@ function App() { useEffect(() => { if (baseContext.localFsRoot) return; - fs.stat("/projects/01/Not/Not.hdl").catch(async () => { + fs.stat("/projects/01/Not.hdl").catch(async () => { await loaders.resetFiles(fs); }); updateVersion(fs);