mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +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) {
|
function shouldPush(uid, newNotifObj, callback) {
|
||||||
|
if (!newNotifObj) {
|
||||||
|
return callback(null, false);
|
||||||
|
}
|
||||||
|
|
||||||
hasNotification(newNotifObj.uniqueId, uid, function(err, hasNotification) {
|
hasNotification(newNotifObj.uniqueId, uid, function(err, hasNotification) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user