From f4187fc67154dd601f9ba29369fcc00b3a60f2f2 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 16 Dec 2015 15:33:00 -0500 Subject: [PATCH] fixing crash with deleted notifications --- src/user/notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user/notifications.js b/src/user/notifications.js index 5a30149eef..b085e7654d 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -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' : '';