You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seq = me._stack.shift(); // BUG this will eventually leak
me._data = arguments;
if (!seq) {
// the chain has ended (for now)
me._waiting = true;
return;
}
args.unshift(me._nextBound);
seq.callback.apply(seq._context, args);
};
}
Sequence.create = Sequence;
Sequence.prototype.then = function (callback, context) {
var me = this
;
if ('function' !== typeof callback) {
throw new Error("`Sequence().then(callback, [context])` requires that `callback` be a function and that `context` be `null`, an object, or a function");