diff --git a/packages/shared-core/src/filters.ts b/packages/shared-core/src/filters.ts index 70ff98230e..443dbbce8d 100644 --- a/packages/shared-core/src/filters.ts +++ b/packages/shared-core/src/filters.ts @@ -250,12 +250,16 @@ export const buildQuery = (filter: SearchFilter[]) => { query.equal = query.equal || {} query.equal[field] = true } else { - // query[queryOperator] = query[queryOperator] || {} - // query[queryOperator]![field] = value + query[queryOperator] = { + ...query[queryOperator], + [field]: value, + } } } else { - // query[queryOperator] = query[queryOperator] || {} - // query[queryOperator]![field] = value + query[queryOperator] = { + ...query[queryOperator], + [field]: value, + } } } })