mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
minor fix to prevent err when trying to mark null nid
This commit is contained in:
@@ -92,7 +92,7 @@ var db = require('./database'),
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (!mids || !mids.length) {
|
||||
if (!Array.isArray(mids) || !mids.length) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ var async = require('async'),
|
||||
|
||||
Notifications.markRead = function(nid, uid, callback) {
|
||||
callback = callback || function() {};
|
||||
if (!parseInt(uid, 10)) {
|
||||
if (!parseInt(uid, 10) || !parseInt(nid, 10)) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user