Skip to content

Commit

Permalink
fix: auto remove dupes
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Mar 11, 2018
1 parent 954bbe5 commit 59e5a26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app-src/scripts/main/global-services/tasks-util-f.js
Expand Up @@ -44,6 +44,12 @@
});
$log.info('DUPE', firstDupe);

// remove dupe
let firstDupeIndex = _.findIndex(tasksArray, (task) => {
return dupeIds.indexOf(task.id) > -1;
});
tasksArray.splice(firstDupeIndex, 1);

SimpleToast('ERROR', '!!! Dupes detected in data for the ids: ' + dupeIds.join(', ') + '. First task title is "' + firstDupe.title + '" !!!', 60000);
}
return hasDupe;
Expand Down

0 comments on commit 59e5a26

Please sign in to comment.