From 46214a6d64002c3dc94c15e112ac7b875adebfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sun, 11 Aug 2024 19:12:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20NAN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/post/tp-vote.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post/tp-vote.vue b/src/components/post/tp-vote.vue index 6d789baa..4a205d9c 100644 --- a/src/components/post/tp-vote.vue +++ b/src/components/post/tp-vote.vue @@ -63,8 +63,8 @@ onMounted(async () => { is_over: voteResult.is_over, data: voteInfo.vote_option_indexes.map((item, index) => ({ title: item, - count: voteResult.option_stats[index], - percent: (voteResult.option_stats[index] / voteResult.user_cnt) * 100, + count: voteResult.option_stats[index] ?? 0, + percent: ((voteResult.option_stats[index] ?? 0) / voteResult.user_cnt) * 100, })), }; });