|
|
@ -54,7 +54,11 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
return oldWatch.call(this, model, expOrFn, function () { |
|
|
|
return oldWatch.call(this, model, expOrFn, function () { |
|
|
|
options && options.store && pushTarget(options.store); |
|
|
|
options && options.store && pushTarget(options.store); |
|
|
|
|
|
|
|
try { |
|
|
|
var res = cb.apply(this, arguments); |
|
|
|
var res = cb.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
options && options.store && popTarget(); |
|
|
|
options && options.store && popTarget(); |
|
|
|
return res; |
|
|
|
return res; |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
@ -91,7 +95,11 @@ |
|
|
|
pushContext(context); |
|
|
|
pushContext(context); |
|
|
|
pushed = true; |
|
|
|
pushed = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
var result = _create.apply(this, arguments); |
|
|
|
var result = _create.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
pushed && popContext(); |
|
|
|
pushed && popContext(); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
}; |
|
|
|
}; |
|
|
@ -100,7 +108,11 @@ |
|
|
|
var old = BI.Loader.prototype[name]; |
|
|
|
var old = BI.Loader.prototype[name]; |
|
|
|
BI.Loader.prototype[name] = function () { |
|
|
|
BI.Loader.prototype[name] = function () { |
|
|
|
pushContext(this); |
|
|
|
pushContext(this); |
|
|
|
|
|
|
|
try { |
|
|
|
var result = old.apply(this, arguments); |
|
|
|
var result = old.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
popContext(); |
|
|
|
popContext(); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
}; |
|
|
|
}; |
|
|
|