From 335a0b065f63df9eba8509cb227675c50400f2f1 Mon Sep 17 00:00:00 2001 From: quenenni Date: Tue, 2 Apr 2013 05:36:20 +0200 Subject: [PATCH] A small correction to avoid a error generated in certain cases --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a7e22ed..052b79d 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ exports.registerRoute = function (hook_name, args, callback) { var timeDiffGood = false; var email = "your email"; - if(userIds && userIds['pending']){ + if(userIds && userIds['pending'] && userIds['pending'].length > 0){ async.forEach(Object.keys(userIds['pending']), function(user){ var userInfo = userIds['pending'][user];