From 489c8b8efe5f1cf41b53ffb1b139fdcfd18d099e Mon Sep 17 00:00:00 2001 From: Young Date: Wed, 14 Aug 2019 19:04:46 +0800 Subject: [PATCH] =?UTF-8?q?BI-46898=20fix:=20render=E7=AD=89=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=87=BA=E7=8E=B0=E5=BC=82=E5=B8=B8=E7=9A=84catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fix/fix.compact.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 17e89a2de..adf04529c 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -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];