From a3fa49ee52d5ceec5164e5793102acdfcac3a56f Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Mon, 17 Oct 2016 15:09:58 -0400 Subject: [PATCH] remove splice and replace with direct assignment --- middleware/dedupe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/dedupe.js b/middleware/dedupe.js index 03082710..3b125d0d 100644 --- a/middleware/dedupe.js +++ b/middleware/dedupe.js @@ -41,7 +41,7 @@ function dedupeResults(req, res, next) { hit: hit.name.default + ' ' + hit.source + ':' + hit._id }); // replace previous dupe item with current hit - uniqueResults.splice(dupeIndex, 1, hit); + uniqueResults[dupeIndex] = hit; } // if not preferred over existing, just log and move on else {