Fix lucene filtering crashing when being provided an invalid binding string as the document array
This commit is contained in:
parent
b1c2308b8b
commit
00179c8a33
|
@ -97,6 +97,9 @@ export const buildLuceneQuery = filter => {
|
||||||
* @param query the JSON lucene query
|
* @param query the JSON lucene query
|
||||||
*/
|
*/
|
||||||
export const luceneQuery = (docs, query) => {
|
export const luceneQuery = (docs, query) => {
|
||||||
|
if (!docs || !Array.isArray(docs)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
if (!query) {
|
if (!query) {
|
||||||
return docs
|
return docs
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue