From f988b2ba306ff2ee358d3793177a5c0ff1ae3b3a Mon Sep 17 00:00:00 2001 From: wjh Date: Thu, 30 May 2024 11:09:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF=E6=88=91=E7=9A=84=E5=8F=91=E8=B5=B7=E5=87=BA=E9=94=99?= =?UTF-8?q?=20(#1073)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1073 Co-authored-by: wjh Co-committed-by: wjh --- .../src/client/approval/context/FormBlock.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/context/FormBlock.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/context/FormBlock.tsx index 49dd46c62..1dc54519a 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/context/FormBlock.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/context/FormBlock.tsx @@ -16,8 +16,8 @@ import { createForm, RecursionField, useField, useFieldSchema } from '@tachybase import { useContextApprovalExecution } from './ApprovalExecution'; export const FormBlockProvider = (props) => { - const { approvalExecution } = useContextApprovalExecution(); - const { snapshot } = approvalExecution; + const { approvalExecution, snapshot: contextSnapshot } = useContextApprovalExecution(); + const snapshot = approvalExecution?.snapshot || contextSnapshot; const fieldSchema = useFieldSchema(); const field = useField(); const formBlockRef = useRef(null);