Explorar o código

type conversion of string to ObjectId

shinoka7 %!s(int64=7) %!d(string=hai) anos
pai
achega
91f7bb3b30
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/server/models/comment.js

+ 1 - 1
src/server/models/comment.js

@@ -29,7 +29,7 @@ module.exports = function(crowi) {
       newComment.comment = comment;
       newComment.commentPosition = position;
       newComment.isMarkdown = isMarkdown || false;
-      newComment.replyTo = replyTo;
+      newComment.replyTo = ObjectId(replyTo);
 
       newComment.save((err, data) => {
         if (err) {