Browse Source

Pull request #3710: KERNEL-16950 fix: 日志

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit '876ab205441f1db42fe25b3d2d5ffac2968cee3d':
  无jira任务 多提交的
  KERNEL-16950 fix: 加一些log
  KERNEL-16950 fix: 日志
research/test
imp-张健 11 months ago
parent
commit
4459339161
  1. 6
      packages/fineui/src/core/4.widget.js

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

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

Loading…
Cancel
Save