From 728c5b32736887ba752d9719f558e23ab5ec695a Mon Sep 17 00:00:00 2001 From: NISHIO Hirokazu <nishio.hirokazu@gmail.com> Date: Mon, 23 Dec 2024 14:52:39 +0900 Subject: [PATCH] fix --- scatter/next-app/hooks/useInferredFeatures.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scatter/next-app/hooks/useInferredFeatures.ts b/scatter/next-app/hooks/useInferredFeatures.ts index 789584a..62d4b6c 100644 --- a/scatter/next-app/hooks/useInferredFeatures.ts +++ b/scatter/next-app/hooks/useInferredFeatures.ts @@ -7,7 +7,7 @@ const useInferredFeatures = (props: Result) => { const comment0 = comments[Object.keys(comments)[0]] const langs = config.translation?.languages || [] return { - dataHasVotes: comment0.hasOwnProperty('agrees'), + dataHasVotes: comment0 && comment0.hasOwnProperty('agrees'), hasTranslations: langs.length > 0, } }, [])