Skip to content

Commit

Permalink
Merge pull request #7634 from kellyselden/mergedTreesForType
Browse files Browse the repository at this point in the history
Addon._treeFor optimization
  • Loading branch information
rwjblue committed Feb 25, 2018
2 parents fdffdad + 2ec95ae commit 6601551
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/broccoli/ember-app.js
Expand Up @@ -611,7 +611,7 @@ class EmberApp {
return this.project.addons.reduce((sum, addon) => {
if (addon.treeFor) {
let tree = addon.treeFor(type);
if (tree) {
if (tree && !mergeTrees.isEmptyTree(tree)) {
sum.push({
name: addon.name,
tree,
Expand Down
4 changes: 4 additions & 0 deletions lib/broccoli/merge-trees.js
Expand Up @@ -94,5 +94,9 @@ module.exports = function mergeTrees(_inputTrees, options) {
}
};

module.exports.isEmptyTree = function isEmptyTree(tree) {
return tree === EMPTY_MERGE_TREE;
};

module.exports._overrideEmptyTree = overrideEmptyTree;
module.exports._upstreamMergeTrees = upstreamMergeTrees;

0 comments on commit 6601551

Please sign in to comment.