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 {