Skip to content

Commit

Permalink
Merge pull request #583 from belong112/master
Browse files Browse the repository at this point in the history
fix: feedbacks were not sorted correctly
  • Loading branch information
MrOrz authored Nov 25, 2024
2 parents 617e79a + 3131d04 commit 111cc23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/ArticleReplyFeedbackControl/ReasonsDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function processedFeedbacks(feedbacks, voteType, isLoadMore) {
.filter(({ vote }) => vote === voteType)
.sort(
(a, b) =>
isEmptyComment(b.comment) - isEmptyComment(a.comment) ||
isEmptyComment(a.comment) - isEmptyComment(b.comment) ||
b.createdAt.localeCompare(a.createdAt)
)
.slice(0, isLoadMore ? feedbacks.length : Math.min(feedbacks.length, 10));
Expand Down

0 comments on commit 111cc23

Please sign in to comment.