caolan/async — pull request #350 by louischatriot (2013-07-16 08:30:11+00:00)
Title: Fix setImmediate incompatibility with IE10 even when process and process.nextTick are defined

Hello,

This references issue https://github.com/caolan/async/issues/299 . The fix sent by @dougwilson (PR https://github.com/caolan/async/pull/317) only works if process or process.nextTick are not defined. This effectively assumes that in a browser context, process.nextTick is not defined, but that's not always the case. For example, if you use browserify to create a browser version of your code, process.nextTick can be defined and in that case IE10 raises the "Invalid calling object" error. That is the case with one of my projects (the javascript database NeDB, https://github.com/louischatriot/nedb).

So I just copy-pasted @dougwilson's fix in the right section and the issue is solved.

Cheers,
Louis