Skip to content

Commit

Permalink
Add invariant statement to prevent flow from complaining
Browse files Browse the repository at this point in the history
  • Loading branch information
irismoini committed Aug 15, 2023
1 parent c51b142 commit 97fc88b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/bundlers/default/src/DefaultBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,8 @@ function createIdealGraph(
// Filter out inline assests as they should not contribute to PRL
let numBundlesContributingToPRL = bundleIdsInGroup.reduce((count, b) => {
let bundle = nullthrows(bundleGraph.getNode(b));
return count + (bundle === 'root' || bundle.bundleBehavior !== 'inline');
invariant(bundle !== 'root');
return count + (bundle.bundleBehavior !== 'inline');
}, 0);

if (numBundlesContributingToPRL > config.maxParallelRequests) {
Expand Down

0 comments on commit 97fc88b

Please sign in to comment.