mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fix crash in notifications
This commit is contained in:
@@ -444,7 +444,7 @@ var async = require('async'),
|
||||
case 'notifications:user_posted_to':
|
||||
case 'notifications:user_flagged_post_in':
|
||||
var usernames = set.map(function(notifObj) {
|
||||
return notifObj.user.username;
|
||||
return notifObj && notifObj.user && notifObj.user.username;
|
||||
}).filter(function(username, idx, array) {
|
||||
return array.indexOf(username) === idx;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user