[ospec] fix nextTickish()

This commit is contained in:
Pierre-Yves Gerardy 2017-01-10 14:59:09 +01:00
parent 618020cd79
commit bd519f3c23

View file

@ -219,7 +219,7 @@ module.exports = new function init() {
if(hasProcess) {
nextTickish = process.nextTick
} else {
nextTickish = function fakeFastNextTick(fn) {
nextTickish = function fakeFastNextTick(next) {
if (stack++ < 5000) next()
else setTimeout(next, stack = 0)
}