use every instead of _.uniq

Array.every is better for check all pass
This commit is contained in:
Hongarc 2019-04-13 09:31:07 +07:00
parent f178f6c118
commit 638a711c4d

View file

@ -98,11 +98,9 @@ TreeCompare.compareAllBranchesWithinTrees = function(treeA, treeB) {
treeB.branches
);
var result = true;
_.uniq(allBranches, function(info, branch) {
result = result && this.compareBranchWithinTrees(treeA, treeB, branch);
}, this);
return result;
return Object.keys(allBranches).every(function(branch) {
return this.compareBranchWithinTrees(treeA, treeB, branch);
}.bind(this));
};
TreeCompare.compareAllTagsWithinTrees = function(treeA, treeB) {