Skip to content


Subversion checkout URL

You can clone with
Download ZIP


fixes setImmediate is undefined error for gecko/webkit browsers #269

merged 1 commit into from

8 participants


Hi there,

Ran into this problem using in Chrome: the source was defining async.setImmediate as async.nextTick before async.nextTick's definition, causing async.waterfall to fail for me, so I simply swapped the order.

Thanks for the great lib, I appreciate it.


Yep I got same problem :(


I closed my duplicate PR and :+1: this one instead :)


@caolan I would appreciate it if you can merge this fix in. Thanks!


@caolan: it's a bit embarrassing that async has been broken in Chrome, Firefox & Safari for a month. IMO, it's one of the most useful JS libraries in existence, both for node and the browser. Let me know if it would help if I rebased this pull request on the latest master or if I tested the fix on different versions of node and/or browsers.

In case it helps, here's what the mozilla docs say about setImmediate():

setImmediate() is not expected to become standard, and is only implemented by recent builds of Internet Explorer. It meets resistance both from Gecko (Firefox) and Webkit (Google/Apple)


Another :+1:, this is obviously just an assignment ordering error with a very simple fix.

@caolan caolan merged commit 9ac2b2f into caolan:master

Sorry folks, didn't notice this since I seem to have stopped getting emails from GitHub. Thankfully @brianmaissy, thought to email me about it.


thanks @caolan, much appreciated. Hope the GH email issue gets sorted.


Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/async.js
2  lib/async.js
@@ -79,10 +79,10 @@
async.nextTick = setImmediate;
else {
- async.setImmediate = async.nextTick;
async.nextTick = function (fn) {
setTimeout(fn, 0);
+ async.setImmediate = async.nextTick;
else {
Something went wrong with that request. Please try again.