zen-fs / dom

DOM backends for ZenFS
https://zenfs.dev/dom/
MIT License
12 stars 4 forks source link

In the `browser.min.js` version, an error occurs. #9

Closed Davilarek closed 6 months ago

Davilarek commented 6 months ago

Using this for init.

window.ZenFS.configure({
      backend: window.ZenFS_DOM.IndexedDB,
      storeName: "VirtualFS",
  }).then(() => console.log(window.ZenFS));

Getting this error:

Uncaught (in promise) TypeError: (destructured parameter) is undefined
    _initialize AsyncStore.ts:162
    ready filesystem.ts:341
    ready AsyncStore.ts:141
    xs config.ts:61
    Pg config.ts:96
    run test.js:9
    async* test.js:14
AsyncStore.ts:162:29

From my investigation, _initialize seems to run twice and on the second run, it fails.

james-pre commented 6 months ago

@Davilarek,

I noticed this issue as well and corrected it (though it took me a few tries).

I apologize for not responding to you sooner, I did not have the correct notification settings for this repository.