From 488aac2e2cd910dbda8c846cda2aebc4fd649110 Mon Sep 17 00:00:00 2001 From: Junyi Date: Tue, 10 Oct 2023 23:20:47 +0800 Subject: [PATCH] fix(client): fix undefined field method on button (#2795) --- packages/core/client/src/schema-initializer/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-initializer/utils.ts b/packages/core/client/src/schema-initializer/utils.ts index 862c5aedf..5f0f51655 100644 --- a/packages/core/client/src/schema-initializer/utils.ts +++ b/packages/core/client/src/schema-initializer/utils.ts @@ -763,8 +763,8 @@ export const useCurrentSchema = (action: string, key: string, find = findSchema, remove() { removeActiveFieldName?.(schema.name); form?.query(schema.name).forEach((field: Field) => { - field.setInitialValue(null); - field.reset(); + field.setInitialValue?.(null); + field.reset?.(); }); schema && rm(schema, remove); },