Browse Source

Fix duplicate search entries when editing

NGPixel 8 years ago
parent
commit
e49246028a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libs/search.js

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