Do not try to match $search key (#716)

Signed-off-by: Ilya Sumbatyants <ilya.sumb@gmail.com>
This commit is contained in:
Ilya Sumbatyants 2021-12-23 16:07:09 +07:00 committed by GitHub
parent 4214d62da6
commit d115f4c5f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,7 @@ export class LiveQuery extends TxProcessor implements Client {
}
const query = q.query
for (const key in query) {
if (key === '$search') continue
if (key === '_id' && ((query._id as any)?.$like === undefined || query._id === undefined)) continue
const value = (query as any)[key]
const result = findProperty([doc], key, value)