Skip to content

Commit

Permalink
fix: fix feedback sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
t192829邱昱禎 committed Nov 25, 2024
1 parent 617e79a commit 3131d04
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 3131d04

Please sign in to comment.