From 43ecaccd053002c5df09b8b4f49b9f9649415338 Mon Sep 17 00:00:00 2001 From: Young Date: Tue, 27 Aug 2019 10:35:11 +0800 Subject: [PATCH] =?UTF-8?q?BI-46898=20fix:=20catch=E5=BC=82=E5=B8=B8?= 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 adf04529c..f10d9e778 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -54,7 +54,11 @@ } return oldWatch.call(this, model, expOrFn, function () { options && options.store && pushTarget(options.store); - var res = cb.apply(this, arguments); + try { + var res = cb.apply(this, arguments); + } catch (e) { + console.error(e); + } options && options.store && popTarget(); return res; }, options); @@ -91,7 +95,11 @@ pushContext(context); pushed = true; } - var result = _create.apply(this, arguments); + try { + var result = _create.apply(this, arguments); + } catch (e) { + console.error(e); + } pushed && popContext(); return result; }; @@ -100,7 +108,11 @@ var old = BI.Loader.prototype[name]; BI.Loader.prototype[name] = function () { pushContext(this); - var result = old.apply(this, arguments); + try { + var result = old.apply(this, arguments); + } catch (e) { + console.error(e); + } popContext(); return result; };