Skip to content

Commit

Permalink
use setImmediate
Browse files Browse the repository at this point in the history
  • Loading branch information
HQidea authored and JacksonTian committed Apr 20, 2015
1 parent bcd9621 commit f2581f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/eventproxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@
return this;
};

var later = typeof process !== 'undefined' && process.nextTick || function (fn) {
var later = (typeof setImmediate !== 'undefined' && setImmediate) ||
(typeof process !== 'undefined' && process.nextTick) || function (fn) {
setTimeout(fn, 0);
};

Expand Down

0 comments on commit f2581f9

Please sign in to comment.