Skip to content

Commit

Permalink
Avoid IndexedDB name conflict in demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoestringresearch committed Jun 29, 2024
1 parent ddd82eb commit 3ccf9d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion demo/demo-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const BUILDS = new Map([
* @property {string} name
* @property {string} vfsModule path of the VFS module
* @property {string} [vfsClassName] name of the VFS class
* @property {string} [vfsName] name of the VFS instance
* @property {object} [vfsOptions] VFS constructor arguments
*/

Expand All @@ -40,6 +41,7 @@ const BUILDS = new Map([
{
name: 'IDBMirrorVFS',
vfsModule: '../src/examples/IDBMirrorVFS.js',
vfsName: 'demo-mirror'
},
{
name: 'OPFSAdaptiveVFS',
Expand Down Expand Up @@ -77,7 +79,7 @@ maybeReset().then(async () => {
const config = VFS_CONFIGS.get(configName);

const dbName = searchParams.get('dbName') ?? 'hello';
const vfsName = searchParams.get('vfsName') ?? 'demo';
const vfsName = searchParams.get('vfsName') ?? config.vfsName ?? 'demo';

// Instantiate SQLite.
const { default: moduleFactory } = await import(BUILDS.get(buildName));
Expand Down

0 comments on commit 3ccf9d8

Please sign in to comment.