From b080cec4b1d5960f94274703eff1523f4b2478e3 Mon Sep 17 00:00:00 2001 From: jvanalst Date: Fri, 23 Mar 2012 11:15:44 -0600 Subject: [PATCH] Make sure process.nextTick exists before calling it --- lib/step.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/step.js b/lib/step.js index b524a6a..e3a7054 100755 --- a/lib/step.js +++ b/lib/step.js @@ -99,8 +99,11 @@ function Step() { localCallback(error, result); } } - process.nextTick(check); // Ensures that check is called at least once - + + if (process && typeof process.nextTick == 'function') { + process.nextTick(check); // Ensures that check is called at least once + } + // Generates a callback for the group return function () { var index = counter++;