Skip to content

Commit

Permalink
Correct reimplementation of nextTick for node < 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Oct 22, 2015
1 parent acb4748 commit d17bc96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions writeToStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ var protocol = require('./constants')

if (process.version.indexOf('v0.1') === 0) {
(function () {
nextTick = function tickShim (func, stream) {
return function () {
nextTick = function tickShim(func, stream) {
process.nextTick(function tickWrap() {
return func(stream)
}
})
}
})()
}
Expand Down

0 comments on commit d17bc96

Please sign in to comment.