Bug
In packages/core/core/src/Parcel.js around line 358, the code does:
let result = results.filter(Boolean).pop();
result.type // TypeError if all builds were aborted
When all pending builds are aborted, results.filter(Boolean) produces an empty array and .pop() returns undefined. The subsequent property access (result.type or similar) throws:
TypeError: Cannot read properties of undefined (reading 'type')
Reproduction
Trigger a build abort (e.g. via AbortController) while multiple builds are queued or in-flight. The crash surfaces in the build result aggregation path.
Fix
Add a null guard before accessing result:
let result = results.filter(Boolean).pop();
if (!result) {
return; // or handle as appropriate — all builds were aborted
}
// safe to use result.type here
Notes
This is distinct from the sort comparator and env invalidation hash issues in PR #10341 — this is a separate null-deref in the abort path.
Bug
In
packages/core/core/src/Parcel.jsaround line 358, the code does:When all pending builds are aborted,
results.filter(Boolean)produces an empty array and.pop()returnsundefined. The subsequent property access (result.typeor similar) throws:Reproduction
Trigger a build abort (e.g. via
AbortController) while multiple builds are queued or in-flight. The crash surfaces in the build result aggregation path.Fix
Add a null guard before accessing
result:Notes
This is distinct from the sort comparator and env invalidation hash issues in PR #10341 — this is a separate null-deref in the abort path.