Commit e4924602 authored by NGPixel's avatar NGPixel

Fix duplicate search entries when editing

parent 8eb21863
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment