Skip to content

Commit

Permalink
#16 fix : data isArray 타입확인
Browse files Browse the repository at this point in the history
  • Loading branch information
leejin-rho committed Jun 27, 2024
1 parent cc5ed4b commit c43e592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/calendar/InfoCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function InfoCalendar() {
};

const customTileContent = ({ date, view }: { date: Date; view: string }) => {
if (data && view === "month") {
if (Array.isArray(data) && view === "month") {
const dayData = data.filter((dayData: MonthCalendarProps) => {
const openDate = new Date(
dayData.openDate.year,
Expand Down

0 comments on commit c43e592

Please sign in to comment.