From 227887ae04c6411994ba0c68fd0eac21d58a0dfa Mon Sep 17 00:00:00 2001 From: liaoxuezhi <2betop.cn@gmail.com> Date: Sat, 20 May 2023 09:34:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20isAlive=20=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis/src/renderers/Dialog.tsx | 2 +- packages/amis/src/renderers/Drawer.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/amis/src/renderers/Dialog.tsx b/packages/amis/src/renderers/Dialog.tsx index 9e9c7476a..0dd53d296 100644 --- a/packages/amis/src/renderers/Dialog.tsx +++ b/packages/amis/src/renderers/Dialog.tsx @@ -371,7 +371,7 @@ export default class Dialog extends React.Component { handleExited() { const {lazySchema, store, statusStore} = this.props; - statusStore?.resetAll(); + statusStore && isAlive(statusStore) && statusStore.resetAll(); if (isAlive(store)) { store.reset(); store.setEntered(false); diff --git a/packages/amis/src/renderers/Drawer.tsx b/packages/amis/src/renderers/Drawer.tsx index 6d9517f39..bd332fefe 100644 --- a/packages/amis/src/renderers/Drawer.tsx +++ b/packages/amis/src/renderers/Drawer.tsx @@ -430,7 +430,7 @@ export default class Drawer extends React.Component { handleExited() { const {lazySchema, store, statusStore} = this.props; - statusStore?.resetAll(); + statusStore && isAlive(statusStore) && statusStore.resetAll(); if (isAlive(store)) { store.reset(); store.setEntered(false);