Skip to content

Commit

Permalink
fixed contains check
Browse files Browse the repository at this point in the history
  • Loading branch information
asapach committed Apr 25, 2014
1 parent 150f787 commit 3e58240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/controllers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ angular.module('peerflixServerApp')
return $q.when(torrent);
} else {
return Torrent.get({ infoHash: hash }).$promise.then(function (torrent) {
if (!_.contains($scope.torrents)) {
if (!_.find($scope.torrents, { infoHash: hash })) {
$scope.torrents.unshift(torrent);
}
return torrent;
Expand Down

0 comments on commit 3e58240

Please sign in to comment.