Skip to content

Commit 8eb230a

Browse files
committed
Work around v8 not having a nice way to convert to string
1 parent 2178a57 commit 8eb230a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mono/wasm/runtime/startup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ async function _fetch_data (url: string): Promise<Response> {
436436
ok: !!data,
437437
url: url,
438438
arrayBuffer: () => Promise.resolve (new Uint8Array (data)),
439-
json: () => Promise.resolve(JSON.parse(data))
439+
json: () => Promise.resolve (JSON.parse (ENVIRONMENT_IS_NODE ? data : read(url))),
440440
});
441441
} else {
442442
return Promise.reject(Error("No fetch implementation available"));

0 commit comments

Comments
 (0)