Skip to content

Commit 85c42bb

Browse files
CR: Comment
1 parent ec8206a commit 85c42bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Components/Web.JS/src/Platform/WebAssemblyResourceLoader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export class WebAssemblyResourceLoader {
3636
if (!this.bootConfig.cacheBootResources) {
3737
// Bypass the entire cache flow, including checking hashes, etc.
3838
// This gives developers an easy opt-out if they don't like anything about the default cache mechanism
39+
// Cloning represents the response as two separate streams so we can process it twice independently
40+
// (once for hash checking, once for streaming compilation). Without this, there would be a read error.
3941
const response = fetch(url, networkFetchOptions);
4042
const data = response.then(r => r.clone().arrayBuffer());
4143
return { name, url, response, data };

0 commit comments

Comments
 (0)