Fix duplicate search entries when editing
This commit is contained in:
parent
8eb2186335
commit
e49246028a
@ -114,8 +114,8 @@ module.exports = {
|
|||||||
AND: { 'entryPath': [entryPath] }
|
AND: { 'entryPath': [entryPath] }
|
||||||
}]
|
}]
|
||||||
})).then((results) => {
|
})).then((results) => {
|
||||||
if (results.totalHits > 0) {
|
if (results && results.length > 0) {
|
||||||
let delIds = _.map(results.hits, 'id')
|
let delIds = _.map(results, 'id')
|
||||||
return self._si.delAsync(delIds)
|
return self._si.delAsync(delIds)
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user