Skip to content

Commit 25308a1

Browse files
authored
Fix assert in asyncLoad when ASSERTIONS=0 (#20991)
1 parent b5cbe11 commit 25308a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/library.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3524,7 +3524,9 @@ addToLibrary({
35243524
$asyncLoad: (url, onload, onerror, noRunDep) => {
35253525
var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
35263526
readAsync(url, (arrayBuffer) => {
3527+
#if ASSERTIONS
35273528
assert(arrayBuffer, `Loading data file "${url}" failed (no arrayBuffer).`);
3529+
#endif
35283530
onload(new Uint8Array(arrayBuffer));
35293531
if (dep) removeRunDependency(dep);
35303532
}, (event) => {

0 commit comments

Comments
 (0)