Browse Source

KERNEL-16950 fix: 加一些log

research/test
jian 11 months ago
parent
commit
9a2f3fd2e3
  1. 16
      packages/fineui/src/core/4.widget.js

16
packages/fineui/src/core/4.widget.js

@ -240,11 +240,9 @@ export class Widget extends OB {
).call(this, render);
if (beforeRenderResult instanceof Promise) {
beforeRenderResult.then(render).catch((e) => {
if (!this.isDestroyed()) {
render(); // 异步render,组件此时可能已经被销毁
} else {
_global.console && console.error(e, 'Async render error! Widget has been destroyed!');
}
_global.console && console.error(e);
// 异步render,组件此时可能已经被销毁
!this.isDestroyed() ? render() : _global.console && console.error('Async render error! Widget has been destroyed!');
});
}
} else {
@ -260,11 +258,9 @@ export class Widget extends OB {
).call(this, init);
if (beforeInitResult instanceof Promise) {
beforeInitResult.then(init).catch((e) => {
if (!this.isDestroyed()) {
init(); // 异步init,组件此时可能已经被销毁
} else {
_global.console && console.error(e, 'Async init error! Widget has been destroyed!');
}
_global.console && console.error(e);
// 异步init,组件此时可能已经被销毁
!this.isDestroyed() ? init() : _global.console && console.error('Async init error! Widget has been destroyed!');
});
}
} else {

Loading…
Cancel
Save