File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -871,9 +871,9 @@ export class JSBuilder extends ExportsWalker {
871871 sb . push ( `
872872} = await (async url => instantiate(
873873 await (
874- typeof globalThis.fetch === "function"
875- ? WebAssembly.compileStreaming(globalThis.fetch(url))
876- : WebAssembly.compile(await (await import("node:fs/promises")).readFile(url))
874+ globalThis.fetch && globalThis.WebAssembly.compileStreaming
875+ ? globalThis. WebAssembly.compileStreaming(globalThis.fetch(url))
876+ : globalThis. WebAssembly.compile(await (await import("node:fs/promises")).readFile(url))
877877 ), {
878878` ) ;
879879 let needsMaybeDefault = false ;
Original file line number Diff line number Diff line change @@ -371,9 +371,9 @@ export const {
371371 internrefFunction
372372} = await ( async url => instantiate (
373373 await (
374- typeof globalThis . fetch === "function"
375- ? WebAssembly . compileStreaming ( globalThis . fetch ( url ) )
376- : WebAssembly . compile ( await ( await import ( "node:fs/promises" ) ) . readFile ( url ) )
374+ globalThis . fetch && globalThis . WebAssembly . compileStreaming
375+ ? globalThis . WebAssembly . compileStreaming ( globalThis . fetch ( url ) )
376+ : globalThis . WebAssembly . compile ( await ( await import ( "node:fs/promises" ) ) . readFile ( url ) )
377377 ) , {
378378 }
379379) ) ( new URL ( "esm.debug.wasm" , import . meta. url ) ) ;
Original file line number Diff line number Diff line change @@ -371,9 +371,9 @@ export const {
371371 internrefFunction
372372} = await ( async url => instantiate (
373373 await (
374- typeof globalThis . fetch === "function"
375- ? WebAssembly . compileStreaming ( globalThis . fetch ( url ) )
376- : WebAssembly . compile ( await ( await import ( "node:fs/promises" ) ) . readFile ( url ) )
374+ globalThis . fetch && globalThis . WebAssembly . compileStreaming
375+ ? globalThis . WebAssembly . compileStreaming ( globalThis . fetch ( url ) )
376+ : globalThis . WebAssembly . compile ( await ( await import ( "node:fs/promises" ) ) . readFile ( url ) )
377377 ) , {
378378 }
379379) ) ( new URL ( "esm.release.wasm" , import . meta. url ) ) ;
You can’t perform that action at this time.
0 commit comments