1
0
Fork 0
mirror of synced 2024-08-05 13:21:26 +12:00

Down to 2 failures.

This commit is contained in:
Sam Rose 2024-06-13 17:05:02 +01:00
parent c01c2c7cc3
commit f909cdee43
No known key found for this signature in database

View file

@ -285,7 +285,10 @@ export const runQuery = (
) => ) =>
(doc: Record<string, any>) => { (doc: Record<string, any>) => {
for (const [key, testValue] of Object.entries(query[type] || {})) { for (const [key, testValue] of Object.entries(query[type] || {})) {
if (!test(deepGet(doc, removeKeyNumbering(key)), testValue)) { const result = test(deepGet(doc, removeKeyNumbering(key)), testValue)
if (query.allOr && result) {
return true
} else if (!query.allOr && !result) {
return false return false
} }
} }