diff --git a/pages/poll/[id].tsx b/pages/poll/[id].tsx index 39d130d..fe4eca8 100644 --- a/pages/poll/[id].tsx +++ b/pages/poll/[id].tsx @@ -76,7 +76,7 @@ const Poll = (props: { showVoteRecordedGroup = true; } else { votedTimeOneOnOne = JSON.parse( - Object.values(poll)[0].split("#")[1] + (Object.values(poll)[0] as string).split("#")[1] ); showVoteRecordedOneOnOne = true; } diff --git a/pages/recent-polls.tsx b/pages/recent-polls.tsx index be06c18..83ea3ff 100644 --- a/pages/recent-polls.tsx +++ b/pages/recent-polls.tsx @@ -145,9 +145,10 @@ const RecentPolls = (): JSX.Element => { - {Object.values(poll)[0].includes("#{") && - (Object.values(poll)[0].split("#{")[0] || "Untitled")} - {!Object.values(poll)[0].includes("#{") && + {(Object.values(poll)[0] as string).includes("#{") && + ((Object.values(poll)[0] as string).split("#{")[0] || + "Untitled")} + {!(Object.values(poll)[0] as string).includes("#{") && (Object.values(poll)[0] || "Untitled")}