diff --git a/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx b/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx index b2bd476f57..6d2959f19b 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/OptionButton.tsx @@ -127,7 +127,7 @@ export default function OptionButton({ id: number }) { const parsedPercent = parseFloat(percent.toFixed(2) || '0') - const hardCodedTitle = HARDCODED_OPTION_TITLE[proposalId][id] + const hardCodedTitle = HARDCODED_OPTION_TITLE[proposalId]?.[id] return ( !disabled && onOptionClick?.()} disabled={disabled} type={type}>
diff --git a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx index 1715ab8f7d..805fd21f83 100644 --- a/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx +++ b/src/pages/KyberDAO/Vote/ProposalItem/Participants.tsx @@ -184,7 +184,7 @@ export default function Participants({ proposalId }: { proposalId?: number }) { proposalInfo?.vote_stats?.options.reduce((max, o) => (o.vote_count > max.vote_count ? o : max)).option === index const filteredParticipants = participants.filter(p => p.option === index) - const hardCodedTitle = proposalId ? HARDCODED_OPTION_TITLE[proposalId][index] : undefined + const hardCodedTitle = proposalId ? HARDCODED_OPTION_TITLE[proposalId]?.[index] : undefined return (