mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
fixed "TypeError: Cannot read property author_id of null"
This commit is contained in:
parent
37d2f169de
commit
cdf6ff2a85
@ -96,7 +96,7 @@ exports.add_reply2 = function (req, res, next) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
if (reply.author_id.toString() !== req.session.user._id.toString()) {
|
||||
if (reply && reply.author_id.toString() !== req.session.user._id.toString()) {
|
||||
message.sendReply2Message(reply.author_id, req.session.user._id, topic_id, reply._id);
|
||||
}
|
||||
proxy.emit('message_saved');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user