We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 703bbb8 commit 88d976dCopy full SHA for 88d976d
lib/api.js
@@ -23,7 +23,12 @@ async function fetchObject(obj, fetchFn) {
23
}
24
25
function fetchWebAssembly(url) {
26
- return fetch(url).then(WebAssembly.compileStreaming);
+ if (WebAssembly.compileStreaming !== undefined) {
27
+ return fetch(url).then(WebAssembly.compileStreaming);
28
+ } else {
29
+ // Node doesn't have `{compile,instantiate}Streaming`.
30
+ return fetch(url).then((resp) => resp.arrayBuffer()).then(WebAssembly.compile);
31
+ }
32
33
34
function fetchUint8Array(url) {
0 commit comments