Closed milahu closed 1 year ago
IndexedDB options should default to {}
{}
bad: options is undefined
undefined
let fs; BrowserFS.configure({ fs: "MountableFileSystem", options: { "/": { fs: "IndexedDB" }, // bad // TypeError: Cannot read properties of undefined (reading 'storeName') }, }, (error) => { if (error) { throw error; } fs = require("fs"); });
workaround: set options to {}
let fs; BrowserFS.configure({ fs: "MountableFileSystem", options: { "/": { fs: "IndexedDB", options: {} }, // workaround }, }, (error) => { if (error) { throw error; } fs = require("fs"); });
I would also set options.storeName to a unique name for the name of the IndexedDB itself, as that fixed the error for me, as a workaround.
IndexedDB options should default to
{}
bad: options is
undefined
workaround: set options to
{}