Explorar o código

Fix duplicate search entries when editing

NGPixel %!s(int64=8) %!d(string=hai) anos
pai
achega
e49246028a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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