1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00

Fix lucene filtering crashing when being provided an invalid binding string as the document array

This commit is contained in:
Andrew Kingston 2021-12-07 13:58:59 +00:00
parent b1c2308b8b
commit 00179c8a33

View file

@ -97,6 +97,9 @@ export const buildLuceneQuery = filter => {
* @param query the JSON lucene query
*/
export const luceneQuery = (docs, query) => {
if (!docs || !Array.isArray(docs)) {
return []
}
if (!query) {
return docs
}