1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

Handle number types custom query

This commit is contained in:
Mel O'Hagan 2022-06-27 13:54:03 +01:00
parent de01b684f0
commit 08f1ddddd0

View file

@ -217,6 +217,9 @@ export const runLuceneQuery = (docs, query) => {
const oneOf = match("oneOf", (docValue, testValue) => {
if (typeof testValue === "string") {
testValue = testValue.split(",")
if (typeof docValue === "number") {
testValue = testValue.map(item => Number(item))
}
}
return !testValue?.includes(docValue)
})