From 08ba683c7d08f0593bffdaa03e5215dc4d59a048 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Mon, 28 Jul 2014 16:08:16 -0400 Subject: [PATCH] fix callback --- src/user/notifications.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/user/notifications.js b/src/user/notifications.js index e2c782a55f..ad42baa7c2 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -73,7 +73,7 @@ var async = require('async'), async.parallel({ unread: function(next) { - getNotifications('uid:' + uid + ':notifications:unread', 0, 9, function(notif_data) { + getNotifications('uid:' + uid + ':notifications:unread', 0, 9, function(notif_data, next) { notif_data.read = false; notif_data.readClass = !notif_data.read ? 'label-warning' : ''; next(null, notif_data); @@ -89,7 +89,8 @@ var async = require('async'), function filterDeleted(notifObj) { return !!notifObj; } - if(err) { + + if (err) { return callback(err); }