Skip to content

Commit

Permalink
use call to avoid ie shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinmetcalf committed Jul 5, 2016
1 parent dbaeeb8 commit 0d0b1e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function drainQueue() {
if (draining) {
return;
}
var timeout = cachedSetTimeout(cleanUpNextTick);
var timeout = cachedSetTimeout.call(null, cleanUpNextTick);
draining = true;

var len = queue.length;
Expand All @@ -67,7 +67,7 @@ function drainQueue() {
}
currentQueue = null;
draining = false;
cachedClearTimeout(timeout);
cachedClearTimeout.call(null, timeout);
}

process.nextTick = function (fun) {
Expand All @@ -79,7 +79,7 @@ process.nextTick = function (fun) {
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
cachedSetTimeout(drainQueue, 0);
cachedSetTimeout.call(null, drainQueue, 0);
}
};

Expand Down

0 comments on commit 0d0b1e5

Please sign in to comment.