build(broccoli): don't set stored diffResult to null on use

Doing this would break trees which are used multiple times.
This commit is contained in:
Caitlin Potter 2015-06-29 10:59:41 -04:00 committed by Tobias Bosch
parent a93ec73e72
commit 73b3ed18c1
1 changed files with 3 additions and 6 deletions

View File

@ -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) {
if (diffResult) return diffResult;
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
diffResult = differ.diffTree();
}
return diffResult;
return differ.diffTree();
};
if (this.inputTrees) {