Skip to content

Commit

Permalink
fix(vercel): child cmts order increment fix #163
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Mar 7, 2021
1 parent f815333 commit e31b172
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/server/src/controller/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ module.exports = class extends BaseRest {
const cmt = await formatCmt(comment, users, this.config());
cmt.children = await Promise.all(comments
.filter(({rid}) => rid === cmt.objectId)
.map(cmt => formatCmt(cmt, users, this.config())));
.map(cmt => formatCmt(cmt, users, this.config())))
.reverse();
return cmt;
}))
});
Expand Down

0 comments on commit e31b172

Please sign in to comment.