diff --git a/api/src/utils/apply-query.ts b/api/src/utils/apply-query.ts index 7beaa049bc..cdb188066b 100644 --- a/api/src/utils/apply-query.ts +++ b/api/src/utils/apply-query.ts @@ -300,7 +300,7 @@ export async function applySearch( function getFilterPath(key: string, value: Record) { const path = [key]; - if (Object.keys(value)[0].startsWith('_') === true) { + if (typeof Object.keys(value)[0] === 'string' && Object.keys(value)[0].startsWith('_') === true) { return path; }