mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
if notif is deleted don't push, prevent crash
This commit is contained in:
@@ -160,6 +160,10 @@ var async = require('async'),
|
||||
};
|
||||
|
||||
function shouldPush(uid, newNotifObj, callback) {
|
||||
if (!newNotifObj) {
|
||||
return callback(null, false);
|
||||
}
|
||||
|
||||
hasNotification(newNotifObj.uniqueId, uid, function(err, hasNotification) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
Reference in New Issue
Block a user