From de01b684f0aa1226acee01835f7f0d36b1d01825 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Mon, 27 Jun 2022 13:38:43 +0100 Subject: [PATCH] Split string by comma if not array --- packages/frontend-core/src/utils/lucene.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 2183b4828f..e7bc8e8afa 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -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) })