Skip to content

Commit

Permalink
Check asset membership before removing from graph
Browse files Browse the repository at this point in the history
  • Loading branch information
gorakong committed Sep 23, 2019
1 parent 7da0bc1 commit dc2c020
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/bundlers/default/src/DefaultBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ export default new Bundler({
let assets = bundleGraph.getDependencyAssets(dependency);

for (let asset of assets) {
if (bundleGraph.isAssetInAncestorBundles(bundle, asset)) {
if (
bundle.hasAsset(asset) &&
bundleGraph.isAssetInAncestorBundles(bundle, asset)
) {
bundleGraph.removeAssetGraphFromBundle(asset, bundle);
}
}
Expand Down

0 comments on commit dc2c020

Please sign in to comment.