Skip to content

Commit

Permalink
build(broccoli): don't set stored diffResult to null on use
Browse files Browse the repository at this point in the history
Doing this would break trees which are used multiple times.
  • Loading branch information
caitp authored and tbosch committed Jun 29, 2015
1 parent a93ec73 commit 73b3ed1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tools/broccoli/diffing-broccoli-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,9 @@ class DiffingPluginWrapper implements BroccoliTree {
// inputTree's rebuild() method, and can be used without being checked.
// Set `this.diffResult` to null and return the previously stored value.
let diffResult = tree.diffResult;
tree.diffResult = null;
if (!diffResult) {
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
diffResult = differ.diffTree();
}
return diffResult;
if (diffResult) return diffResult;
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
return differ.diffTree();
};

if (this.inputTrees) {
Expand Down

0 comments on commit 73b3ed1

Please sign in to comment.