Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AGawrys committed Aug 2, 2022
1 parent 461de02 commit 0f9bc50
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions packages/core/core/src/BundleGraph.js
Expand Up @@ -1810,6 +1810,21 @@ export default class BundleGraph {
.some(n => n.type === 'root');
}

/**
* Update the asset in a Bundle Graph and clear the associated Bundle hash.
*/
updateAsset(asset: Asset) {
this._graph.updateNode(
this._graph.getNodeIdByContentKey(asset.id),
nodeFromAsset(asset),
);
let bundles = this.findBundlesWithAsset(asset);
for (let bundle of bundles) {
// the bundle content will change with a modified asset
this._bundleContentHashes.delete(bundle.id);
}
}

getEntryRoot(projectRoot: FilePath, target: Target): FilePath {
let cached = this._targetEntryRoots.get(target.distDir);
if (cached != null) {
Expand Down Expand Up @@ -1841,18 +1856,4 @@ export default class BundleGraph {
this._targetEntryRoots.set(target.distDir, root);
return root;
}
/**
* Update the asset in a Bundle Graph and clear the associated Bundle hash.
*/
updateAsset(asset: Asset) {
this._graph.updateNode(
this._graph.getNodeIdByContentKey(asset.id),
nodeFromAsset(asset),
);
let bundles = this.findBundlesWithAsset(asset);
for (let bundle of bundles) {
// the bundle content will change with a modified asset
this._bundleContentHashes.delete(bundle.id);
}
}
}

0 comments on commit 0f9bc50

Please sign in to comment.