mirror of
https://github.com/cnodejs/nodeclub.git
synced 2026-01-18 15:13:13 +00:00
fix bug: don't trim before update reply
This commit is contained in:
parent
ed37009c0d
commit
aedccbcb3e
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user