This commit is contained in:
Adria Navarro 2024-09-30 15:57:49 +02:00
parent 53620907bb
commit be70692cfd
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ export async function search(
.map(filter => db.removeKeyNumbering(filter.field)) || []
// Carry over filters for unused fields
Object.keys(options.query).forEach(key => {
Object.keys(options.query || {}).forEach(key => {
const operator = key as Exclude<SearchFilterKey, LogicalOperator>
Object.keys(options.query[operator] || {}).forEach(field => {
if (!existingFields.includes(db.removeKeyNumbering(field))) {