From c6d10e42d14d5b67c865cf44a0df8bf7e5054103 Mon Sep 17 00:00:00 2001 From: jian Date: Sun, 17 Dec 2023 22:04:49 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-16950=20fix:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/core/4.widget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fineui/src/core/4.widget.js b/packages/fineui/src/core/4.widget.js index c8fbe5d2f..df12ef774 100644 --- a/packages/fineui/src/core/4.widget.js +++ b/packages/fineui/src/core/4.widget.js @@ -241,7 +241,7 @@ export class Widget extends OB { if (beforeRenderResult instanceof Promise) { beforeRenderResult.then(render).catch((e) => { _global.console && console.error(e); - render(); + !this.isDestroyed() && render(); // 异步render,改组件此时可能已经被销毁 }); } } else { @@ -258,7 +258,7 @@ export class Widget extends OB { if (beforeInitResult instanceof Promise) { beforeInitResult.then(init).catch((e) => { _global.console && console.error(e); - init(); + !this.isDestroyed() && init(); // 异步render,改组件此时可能已经被销毁 }); } } else {