fix crash in notifications

v1.18.x
barisusakli 9 years ago
parent 7bf808d0f4
commit b1cc1725a9

@ -444,7 +444,7 @@ var async = require('async'),
case 'notifications:user_posted_to': case 'notifications:user_posted_to':
case 'notifications:user_flagged_post_in': case 'notifications:user_flagged_post_in':
var usernames = set.map(function(notifObj) { var usernames = set.map(function(notifObj) {
return notifObj.user.username; return notifObj && notifObj.user && notifObj.user.username;
}).filter(function(username, idx, array) { }).filter(function(username, idx, array) {
return array.indexOf(username) === idx; return array.indexOf(username) === idx;
}); });

Loading…
Cancel
Save