Browse Source

remove splice and replace with direct assignment

pull/687/head
Diana Shkolnikov 8 years ago committed by GitHub
parent
commit
a3fa49ee52
  1. 2
      middleware/dedupe.js

2
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 {

Loading…
Cancel
Save