|
|
@ -241,7 +241,7 @@ 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); |
|
|
|
render(); |
|
|
|
!this.isDestroyed() && render(); // 异步render,改组件此时可能已经被销毁
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -258,7 +258,7 @@ 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); |
|
|
|
init(); |
|
|
|
!this.isDestroyed() && init(); // 异步render,改组件此时可能已经被销毁
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|