Skip to content

Commit 73b3ed1

Browse files
caitptbosch
authored andcommitted
build(broccoli): don't set stored diffResult to null on use
Doing this would break trees which are used multiple times.
1 parent a93ec73 commit 73b3ed1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tools/broccoli/diffing-broccoli-plugin.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ class DiffingPluginWrapper implements BroccoliTree {
7575
// inputTree's rebuild() method, and can be used without being checked.
7676
// Set `this.diffResult` to null and return the previously stored value.
7777
let diffResult = tree.diffResult;
78-
tree.diffResult = null;
79-
if (!diffResult) {
80-
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
81-
diffResult = differ.diffTree();
82-
}
83-
return diffResult;
78+
if (diffResult) return diffResult;
79+
let differ = index === false ? this.treeDiffer : this.treeDiffers[index];
80+
return differ.diffTree();
8481
};
8582

8683
if (this.inputTrees) {

0 commit comments

Comments
 (0)