mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 12:55:59 +00:00
Fix ne search (#6330)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
8ac67565b7
commit
5059e067da
@ -290,9 +290,7 @@ function getResultIds (ids: Set<Ref<Doc>>, _id: ObjQueryType<Ref<Doc>> | undefin
|
|||||||
const result = new Set<Ref<Doc>>()
|
const result = new Set<Ref<Doc>>()
|
||||||
if (_id !== undefined) {
|
if (_id !== undefined) {
|
||||||
if (typeof _id === 'string') {
|
if (typeof _id === 'string') {
|
||||||
if (!ids.has(_id)) {
|
if (ids.has(_id)) {
|
||||||
return new Set()
|
|
||||||
} else {
|
|
||||||
result.add(_id)
|
result.add(_id)
|
||||||
}
|
}
|
||||||
} else if (_id.$in !== undefined) {
|
} else if (_id.$in !== undefined) {
|
||||||
@ -302,11 +300,13 @@ function getResultIds (ids: Set<Ref<Doc>>, _id: ObjQueryType<Ref<Doc>> | undefin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (_id.$nin !== undefined) {
|
} else if (_id.$nin !== undefined) {
|
||||||
for (const id of ids) {
|
for (const id of _id.$nin) {
|
||||||
if (!_id.$nin.includes(id)) {
|
ids.delete(id)
|
||||||
result.add(id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return ids
|
||||||
|
} else if (_id.$ne !== undefined) {
|
||||||
|
ids.delete(_id.$ne)
|
||||||
|
return ids
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ids
|
return ids
|
||||||
|
Loading…
Reference in New Issue
Block a user