Split string by comma if not array
This commit is contained in:
parent
ee74e724c6
commit
b295ecfeda
|
@ -215,6 +215,9 @@ export const runLuceneQuery = (docs, query) => {
|
||||||
|
|
||||||
// Process an includes match (fails if the value is not included)
|
// Process an includes match (fails if the value is not included)
|
||||||
const oneOf = match("oneOf", (docValue, testValue) => {
|
const oneOf = match("oneOf", (docValue, testValue) => {
|
||||||
|
if (typeof testValue === "string") {
|
||||||
|
testValue = testValue.split(",")
|
||||||
|
}
|
||||||
return !testValue?.includes(docValue)
|
return !testValue?.includes(docValue)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue