From a6892dfff3bb2979e6660aa8b6146d74b3b8c853 Mon Sep 17 00:00:00 2001
From: katherinehhh <shunai.tang@hand-china.com>
Date: Tue, 13 Jun 2023 10:12:51 +0800
Subject: [PATCH] fix: error reported after deleting the associationFilter 
 block linkage field (#2038)

---
 packages/core/client/src/block-provider/hooks/index.ts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts
index 9940c752e..6d8d12337 100644
--- a/packages/core/client/src/block-provider/hooks/index.ts
+++ b/packages/core/client/src/block-provider/hooks/index.ts
@@ -957,6 +957,9 @@ const isOptionalField = (field) => {
 
 export const useAssociationFilterBlockProps = () => {
   const collectionField = AssociationFilter.useAssociationField();
+  if (!collectionField) {
+    return {};
+  }
   const fieldSchema = useFieldSchema();
   const optionalFieldList = useOptionalFieldList();
   const { getDataBlocks } = useFilterBlock();