From 3ccf9d8f33216234a701374bac9b2100fc096060 Mon Sep 17 00:00:00 2001 From: Roy Hashimoto Date: Sat, 29 Jun 2024 13:55:44 -0700 Subject: [PATCH] Avoid IndexedDB name conflict in demo. --- demo/demo-worker.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/demo-worker.js b/demo/demo-worker.js index 1d58fb3..f6285d0 100644 --- a/demo/demo-worker.js +++ b/demo/demo-worker.js @@ -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 */ @@ -40,6 +41,7 @@ const BUILDS = new Map([ { name: 'IDBMirrorVFS', vfsModule: '../src/examples/IDBMirrorVFS.js', + vfsName: 'demo-mirror' }, { name: 'OPFSAdaptiveVFS', @@ -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));