diff --git a/packages/server/src/sdk/app/rows/search.ts b/packages/server/src/sdk/app/rows/search.ts index 94ca2182b4..8a0fa3b2f8 100644 --- a/packages/server/src/sdk/app/rows/search.ts +++ b/packages/server/src/sdk/app/rows/search.ts @@ -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 Object.keys(options.query[operator] || {}).forEach(field => { if (!existingFields.includes(db.removeKeyNumbering(field))) {