Skip to content

Commit a189b52

Browse files
committed
Fix fallback for binaryen version resolution
Updates the binaryen version assignment to use the dependency version as a fallback if not found in packages. This ensures compatibility with different lockfile structures.
1 parent 150cb32 commit a189b52

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/build-web.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export function buildWeb() {
99

1010
const mainVersion = pkg.version;
1111
// lockfileVersion 3 stores deps in packages["node_modules/..."]
12-
const binaryenVersion = pkg.packages["node_modules/binaryen"].version;
1312
const binaryenVersion = pkg.packages["node_modules/binaryen"].version || pkg.dependencies.binaryen.version;
1413
const longVersion = pkg.packages["node_modules/long"].version || pkg.dependencies.long.version;
1514

@@ -42,4 +41,4 @@ export function buildWeb() {
4241
document.head.appendChild(elem);
4342
}
4443
`);
45-
}
44+
}

0 commit comments

Comments
 (0)