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:
parent
a93ec73e72
commit
73b3ed18c1
|
@ -75,12 +75,9 @@ class DiffingPluginWrapper implements BroccoliTree {
|
||||||
// inputTree's rebuild() method, and can be used without being checked.
|
// inputTree's rebuild() method, and can be used without being checked.
|
||||||
// Set `this.diffResult` to null and return the previously stored value.
|
// Set `this.diffResult` to null and return the previously stored value.
|
||||||
let diffResult = tree.diffResult;
|
let diffResult = tree.diffResult;
|
||||||
tree.diffResult = null;
|
if (diffResult) return diffResult;
|
||||||
if (!diffResult) {
|
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
|
||||||
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
|
return differ.diffTree();
|
||||||
diffResult = differ.diffTree();
|
|
||||||
}
|
|
||||||
return diffResult;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.inputTrees) {
|
if (this.inputTrees) {
|
||||||
|
|
Loading…
Reference in New Issue