mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-24 06:58:34 +02:00
use every
instead of _.uniq
Array.every is better for check all pass
This commit is contained in:
parent
f178f6c118
commit
638a711c4d
1 changed files with 3 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue