shinoka7 před 6 roky
rodič
revize
a0a3e74ab6
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      src/server/models/comment.js

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

@@ -78,10 +78,10 @@ module.exports = function(crowi) {
     }));
   };
 
-  commentSchema.methods.removeWithReplies = function() {
+  commentSchema.methods.removeWithReplies = async function() {
     const Comment = crowi.model('Comment');
 
-    return new Promise(((resolve, reject) => {
+    return await new Promise(((resolve, reject) => {
       Comment.remove({ $or: [{ replyTo: this._id }, { _id: this._id }] }, (err, done) => {
         if (err) {
           return reject(err);