Skip to content

Commit

Permalink
Fix setImmediate incompatibility with IE10 also when process and proc…
Browse files Browse the repository at this point in the history
…ess.nextTick are defined
  • Loading branch information
louischatriot committed Jul 16, 2013
1 parent d8601a1 commit be1f674
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@
else {
async.nextTick = process.nextTick;
if (typeof setImmediate !== 'undefined') {
async.setImmediate = setImmediate;
async.setImmediate = function (fn) {
// not a direct alias for IE10 compatibility
setImmediate(fn);
};
}
else {
async.setImmediate = async.nextTick;
Expand Down

2 comments on commit be1f674

@diversario
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to upgrade async from 0.2.9 to the current version and this change makes my tests timeout. If I install async 0.9.0 and undo this commit – everything is fine. Any ideas on where I should look? Running node 0.10.3x.

@aearly
Copy link
Collaborator

@aearly aearly commented on be1f674 Feb 3, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you overriding setImmediate elsewhere in your code?

Please sign in to comment.