A small correction to avoid a error generated in certain cases

This commit is contained in:
quenenni 2013-04-02 05:36:20 +02:00
parent 2efae97d4a
commit 335a0b065f

View file

@ -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];