浏览代码

Fix duplicate search entries when editing

NGPixel 8 年之前
父节点
当前提交
e49246028a
共有 1 个文件被更改,包括 2 次插入2 次删除
  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