Browse Source

Merge pull request #1078 in VISUAL/fineui from ~YOUNG/fineui:master to master

* commit '489c8b8efe5f1cf41b53ffb1b139fdcfd18d099e':
  BI-46898 fix: render等可能出现异常的catch
es6
Young 5 years ago
parent
commit
6ad6d19029
  1. 18
      dist/fix/fix.compact.js

18
dist/fix/fix.compact.js vendored

@ -133,7 +133,11 @@
BI.Widget.prototype._init = function () {
var self = this;
var needPop = createStore.call(this);
_init.apply(this, arguments);
try {
_init.apply(this, arguments);
} catch (e) {
console.error(e);
}
needPop && popTarget();
};
@ -145,13 +149,21 @@
pushTarget(this.store);
initWatch(this, this.watch);
}
_render.apply(this, arguments);
try {
_render.apply(this, arguments);
} catch (e) {
console.error(e);
}
needPop && popTarget();
};
var unMount = BI.Widget.prototype.__d;
BI.Widget.prototype.__d = function () {
unMount.apply(this, arguments);
try {
unMount.apply(this, arguments);
} catch (e) {
console.error(e);
}
this.store && BI.isFunction(this.store.destroy) && this.store.destroy();
BI.each(this._watchers, function (i, unwatches) {
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];

Loading…
Cancel
Save