Skip to content

Commit 0b2a990

Browse files
youngminssclaude
andcommitted
fix: formatScheduledDate 예외 처리 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3e2ad0d commit 0b2a990

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/pageComponents/gathering/opinion/ResultView.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ const VoteList = ({ votes }: VoteListProps) => {
5656
};
5757

5858
const formatScheduledDate = (dateStr: string): string => {
59-
const date = parse(dateStr, "yyyy-MM-dd", new Date());
60-
return format(date, "M월 d일");
59+
try {
60+
const date = parse(dateStr, "yyyy-MM-dd", new Date());
61+
return format(date, "M월 d일");
62+
} catch {
63+
return "";
64+
}
6165
};
6266

6367
export const ResultView = ({ recommendationResult }: ResultViewProps) => {

0 commit comments

Comments
 (0)