fixing crash with deleted notifications

This commit is contained in:
Julian Lam
2015-12-16 15:33:00 -05:00
parent 40f0076b77
commit f4187fc671

View File

@@ -78,8 +78,8 @@ var async = require('async'),
notifs.forEach(function(notification, index) {
if (!notification) {
winston.verbose('[notifications.get] nid ' + nids[index] + ' not found. Removing.');
deletedNids.push(nids[index]);
winston.verbose('[notifications.get] nid ' + notification.nid + ' not found. Removing.');
deletedNids.push(notification.nid);
} else {
notification.read = read;
notification.readClass = !notification.read ? 'unread' : '';