fix bug: don't trim before update reply

This commit is contained in:
jysperm 2014-10-26 20:06:41 +08:00
parent ed37009c0d
commit aedccbcb3e

View File

@ -143,8 +143,8 @@ exports.update = function (req, res, next) {
if (String(reply.author_id) === req.session.user._id.toString() || req.session.user.is_admin) {
reply.content = content.trim();
if (content.length > 0) {
if (content.trim().length > 0) {
reply.content = content;
reply.save(function (err) {
if (err) {
return next(err);