Browse Source

无jira任务,console一下

es6
Guyi 3 years ago
parent
commit
f799199051
  1. 10
      src/core/4.widget.js

10
src/core/4.widget.js

@ -147,7 +147,10 @@
self.__async = true; self.__async = true;
var beforeRenderResult = (self.options.beforeRender || self.beforeRender).call(self, render); var beforeRenderResult = (self.options.beforeRender || self.beforeRender).call(self, render);
if (beforeRenderResult instanceof Promise) { if (beforeRenderResult instanceof Promise) {
beforeRenderResult.then(render).catch(render); beforeRenderResult.then(render).catch(function (e) {
_global.console && console.error(e);
render();
});
} }
} else { } else {
self._render(); self._render();
@ -159,7 +162,10 @@
this.__asking = true; this.__asking = true;
var beforeInitResult = (this.options.beforeInit || this.beforeInit).call(this, init); var beforeInitResult = (this.options.beforeInit || this.beforeInit).call(this, init);
if (beforeInitResult instanceof Promise) { if (beforeInitResult instanceof Promise) {
beforeInitResult.then(init).catch(init); beforeInitResult.then(init).catch(function (e) {
_global.console && console.error(e);
init();
});
} }
} else { } else {
init(); init();

Loading…
Cancel
Save