Skip to content

Commit 7302e0f

Browse files
authored
Update dummy.html
1 parent eb12fc3 commit 7302e0f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pages/dummy.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@
1414
try {
1515
const res = await fetch(url);
1616
if (!res.ok) throw new Error(`HTTP ${res.status} ${res.statusText}`);
17-
try {
18-
return await WebAssembly.instantiateStreaming(res, imports);
19-
} catch {
20-
alert('fallback');
21-
// Fallback if wrong MIME
22-
const bytes = await res.arrayBuffer();
23-
return await WebAssembly.instantiate(bytes, imports);
24-
}
17+
18+
return await WebAssembly.instantiateStreaming(res, imports);
2519
} catch (e) {
2620
throw new Error(`Failed to fetch/instantiate WASM: ${e.message}`);
2721
}

0 commit comments

Comments
 (0)