From 3131d046cc67534ee8988f917e997fa79375f3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?t192829=E9=82=B1=E6=98=B1=E7=A6=8E?= Date: Mon, 25 Nov 2024 15:30:08 +0800 Subject: [PATCH] fix: fix feedback sorting --- components/ArticleReplyFeedbackControl/ReasonsDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ArticleReplyFeedbackControl/ReasonsDisplay.js b/components/ArticleReplyFeedbackControl/ReasonsDisplay.js index 5cdd5b2f..e3cd2be9 100644 --- a/components/ArticleReplyFeedbackControl/ReasonsDisplay.js +++ b/components/ArticleReplyFeedbackControl/ReasonsDisplay.js @@ -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));