Skip to content

Commit 8fffbbc

Browse files
author
Ilya Radchenko
committed
Merge pull request #51 from xdissent/dedupe-repos
Dedupe all repos
2 parents 6f3197f + 9c67ca3 commit 8fffbbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,12 @@ function getRepos(token, username, callback) {
458458
}
459459
});
460460

461-
// Sometimes we can get multiple copies of the same team repo, so we uniq it
462-
team_repos = _.uniq(team_repos, false, function (item) {
461+
// Sometimes we can get multiple copies of the same repo, so we uniq it
462+
repos = _.uniq(repos.concat(team_repos), false, function (item) {
463463
return item.id;
464464
});
465465

466-
callback(null, repos.concat(team_repos));
466+
callback(null, repos);
467467
}
468468
);
469469
}

0 commit comments

Comments
 (0)