Cannot read property 'reply' of null
Comment.findById(_comment.cid,function (err,comment) {
var reply={
from:_comment.from,
to:_comment.tid,//点这个头像的人要回复给他
content:_comment.content
}
console.log(_comment.from);
console.log(_comment.tid);
console.log(_comment.content);
console.log(comment+"77777777777");
comment.reply.push(reply);
comment.save(function (err,comment) {//
if(err){
console.log(err)
}
res.redirect("/movie/"+movieId)
})
})
Cannot read property 'reply' of null,一直显示这个错误 console.log(comment+"77777777777");这个comment一直为null,那个大神请教一下