From 73b3ed18c17bb1e4bd8837e6253d2e16de8208e6 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Mon, 29 Jun 2015 10:59:41 -0400 Subject: [PATCH] build(broccoli): don't set stored diffResult to null on use Doing this would break trees which are used multiple times. --- tools/broccoli/diffing-broccoli-plugin.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/broccoli/diffing-broccoli-plugin.ts b/tools/broccoli/diffing-broccoli-plugin.ts index 6c9e3bf516..636d44d1d8 100644 --- a/tools/broccoli/diffing-broccoli-plugin.ts +++ b/tools/broccoli/diffing-broccoli-plugin.ts @@ -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) {