diff --git a/packages/builder/src/helpers/lucene.js b/packages/builder/src/helpers/lucene.js index 5b8e1b805e..2348bb1114 100644 --- a/packages/builder/src/helpers/lucene.js +++ b/packages/builder/src/helpers/lucene.js @@ -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 }