From 66496c67a5cf58a9c9bbb3a79303393572b3aefe Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Wed, 20 Jun 2012 11:04:55 +0300 Subject: [PATCH] fix __heartbeat__ so deep checks succeed when no dependencies are defined --- lib/heartbeat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/heartbeat.js b/lib/heartbeat.js index 2e8927263..027fc9661 100644 --- a/lib/heartbeat.js +++ b/lib/heartbeat.js @@ -18,7 +18,7 @@ exports.setup = function(app, options, cb) { if (typeof options == 'function') { cb = options; - } else if (options) { + } else if (options && options.dependencies) { dependencies = options.dependencies; } var count = dependencies.length; @@ -67,7 +67,7 @@ exports.setup = function(app, options, cb) { } // check all dependencies if deep - if (deep) { + if (deep && count) { for (var i = 0; i < count; i++) { check(dependencies[i] + exports.path, checkCB(i)); } -- GitLab