Browse Source

BI-59964 fix: nextTick传两个参数的情况

es6
windy 5 years ago
parent
commit
a762b5226c
  1. 7
      src/core/base.js

7
src/core/base.js

@ -712,17 +712,18 @@ if (!_global.BI) {
}; };
} }
return function queueNextTick(cb, ctx) { return function queueNextTick(cb) {
var _resolve = void 0; var _resolve = void 0;
var args = [].slice.call(arguments, 1);
callbacks.push(function () { callbacks.push(function () {
if (cb) { if (cb) {
try { try {
cb.call(ctx); cb.apply(null, args);
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }
} else if (_resolve) { } else if (_resolve) {
_resolve(ctx); _resolve.apply(null, args);
} }
}); });
if (!pending) { if (!pending) {

Loading…
Cancel
Save