aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/extern-post-js.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-08-01 16:41:12 +0000
committerstephan <stephan@noemail.net>2023-08-01 16:41:12 +0000
commit2877c43e6c08d499e52459507201190781abda42 (patch)
treea8545589864086257ca7babd9594f985a7a3f398 /ext/wasm/api/extern-post-js.c-pp.js
parent887f6e5082bdd8cc3247d38eebbfc3b813964db3 (diff)
downloadsqlite-2877c43e6c08d499e52459507201190781abda42.tar.gz
sqlite-2877c43e6c08d499e52459507201190781abda42.zip
Filter the wasmfs-specific JS module result type check out of non-wasmfs builds.
FossilOrigin-Name: ef7c121049f77200ecc4da260a90776264af0e84122d0133b4986959aedc653a
Diffstat (limited to 'ext/wasm/api/extern-post-js.c-pp.js')
-rw-r--r--ext/wasm/api/extern-post-js.c-pp.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/wasm/api/extern-post-js.c-pp.js b/ext/wasm/api/extern-post-js.c-pp.js
index 00cb3fab9..63e55051c 100644
--- a/ext/wasm/api/extern-post-js.c-pp.js
+++ b/ext/wasm/api/extern-post-js.c-pp.js
@@ -62,6 +62,7 @@ const toExportForESM =
globalThis.sqlite3InitModule = function ff(...args){
//console.warn("Using replaced sqlite3InitModule()",globalThis.location);
return originalInit(...args).then((EmscriptenModule)=>{
+//#if wasmfs
if('undefined'!==typeof WorkerGlobalScope &&
EmscriptenModule['ENVIRONMENT_IS_PTHREAD']){
/** Workaround for wasmfs-generated worker, which calls this
@@ -72,6 +73,7 @@ const toExportForESM =
//console.warn("sqlite3InitModule() returning E-module.",EmscriptenModule);
return EmscriptenModule;
}
+//#endif
//console.warn("sqlite3InitModule() returning sqlite3 object.");
const s = EmscriptenModule.sqlite3;
s.scriptInfo = initModuleState;