Skip to content

Commit

Permalink
Change array filtering method
Browse files Browse the repository at this point in the history
This addresses #10 - which is a tricky issue to replicate although I was
managing semi-reliably with the contact creates in that issue.
  • Loading branch information
eileenmcnaughton committed Feb 26, 2021
1 parent b67290d commit f3d6082
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ang/deduper/dupefindCntrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,8 @@
}

function removeMergedContact(id) {
_.each($scope.duplicatePairs, function(pair, index) {
if (typeof(pair) !== 'undefined' && (pair['dstID'] === id || pair['srcID'] === id)) {
$scope.duplicatePairs.splice(index, 1);
}
$scope.duplicatePairs = $.grep($scope.duplicatePairs, function (pair) {
return typeof(pair) !== 'undefined' && pair.dstID !== id && pair.srcID !== id;
});
updateFoundCount();
}
Expand Down

0 comments on commit f3d6082

Please sign in to comment.