rahuldshetty commited on
Commit
9575158
1 Parent(s): 76250b1

Upload main.js

Browse files
Files changed (1) hide show
  1. main.js +1 -1
main.js CHANGED
@@ -980,7 +980,7 @@ function instantiateAsync(binary, binaryFile, imports, callback) {
980
  // https://github.com/emscripten-core/emscripten/pull/16917
981
  !ENVIRONMENT_IS_NODE &&
982
  typeof fetch == 'function') {
983
- return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
984
  // Suppress closure warning here since the upstream definition for
985
  // instantiateStreaming only allows Promise<Repsponse> rather than
986
  // an actual Response.
 
980
  // https://github.com/emscripten-core/emscripten/pull/16917
981
  !ENVIRONMENT_IS_NODE &&
982
  typeof fetch == 'function') {
983
+ return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => response.arrayBuffer()).then((response) => {
984
  // Suppress closure warning here since the upstream definition for
985
  // instantiateStreaming only allows Promise<Repsponse> rather than
986
  // an actual Response.