From e49246028aa53606ee4bd5c450064b1711b6633d Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 18 Mar 2017 11:46:34 -0400 Subject: [PATCH] Fix duplicate search entries when editing --- libs/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/search.js b/libs/search.js index 37d33ecf..093811ce 100644 --- a/libs/search.js +++ b/libs/search.js @@ -114,8 +114,8 @@ module.exports = { AND: { 'entryPath': [entryPath] } }] })).then((results) => { - if (results.totalHits > 0) { - let delIds = _.map(results.hits, 'id') + if (results && results.length > 0) { + let delIds = _.map(results, 'id') return self._si.delAsync(delIds) } else { return true