Node.js based forum software built for the modern web
crash fix #3031
Barış Soner Uşaklı68835844b0d8
diff --git a/src/topics/follow.js b/src/topics/follow.jsindex c34e15fd96..a266ef150b 100644--- a/src/topics/follow.js+++ b/src/topics/follow.js@@ -136,11 +136,17 @@ module.exports = function(Topics) {nid: 'tid:' + postData.topic.tid + ':pid:' + postData.pid + ':uid:' + exceptUid,tid: postData.topic.tid,from: exceptUid- }, next);+ }, function(err, notification) {+ if (err) {+ return next(err);+ }+ if (notification) {+ notifications.push(notification, followers);+ }+ next();+ });},- function(notification, next) {- notifications.push(notification, followers);-+ function(next) {async.eachLimit(followers, 3, function(toUid, next) {async.parallel({userData: async.apply(user.getUserFields, toUid, ['username']),