From f385c34c72a3aa190448c29dfadbc081239182e1 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Thu, 21 Mar 2024 16:32:51 +0800 Subject: [PATCH] fix: filter does not allow passing empty objects (#3780) --- packages/core/client/src/block-provider/BlockProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/block-provider/BlockProvider.tsx b/packages/core/client/src/block-provider/BlockProvider.tsx index 483d48b20..da97a5c09 100644 --- a/packages/core/client/src/block-provider/BlockProvider.tsx +++ b/packages/core/client/src/block-provider/BlockProvider.tsx @@ -349,7 +349,7 @@ export const useParamsFromRecord = () => { if (record.__collection && collectionField && !['oho', 'm2o', 'obo'].includes(collectionField.interface)) { obj['targetCollection'] = record.__collection; } - if (!filterByTk) { + if (!filterByTk && Object.keys(filter).length > 0) { obj['filter'] = filter; } return obj;