1
0
Fork 0
mirror of synced 2024-07-04 14:01:27 +12:00

Split string by comma if not array

This commit is contained in:
Mel O'Hagan 2022-06-27 13:38:43 +01:00
parent c5cfe0539c
commit de01b684f0

View file

@ -215,6 +215,9 @@ export const runLuceneQuery = (docs, query) => {
// Process an includes match (fails if the value is not included)
const oneOf = match("oneOf", (docValue, testValue) => {
if (typeof testValue === "string") {
testValue = testValue.split(",")
}
return !testValue?.includes(docValue)
})