File tree 3 files changed +9
-9
lines changed
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 {
871
871
sb . push ( `
872
872
} = await (async url => instantiate(
873
873
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))
877
877
), {
878
878
` ) ;
879
879
let needsMaybeDefault = false ;
Original file line number Diff line number Diff line change @@ -371,9 +371,9 @@ export const {
371
371
internrefFunction
372
372
} = await ( async url => instantiate (
373
373
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 ) )
377
377
) , {
378
378
}
379
379
) ) ( new URL ( "esm.debug.wasm" , import . meta. url ) ) ;
Original file line number Diff line number Diff line change @@ -371,9 +371,9 @@ export const {
371
371
internrefFunction
372
372
} = await ( async url => instantiate (
373
373
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 ) )
377
377
) , {
378
378
}
379
379
) ) ( new URL ( "esm.release.wasm" , import . meta. url ) ) ;
You can’t perform that action at this time.
0 commit comments