Skip to content

Commit 6675607

Browse files
committed
[Fix] Error on disabledDates?.length call (#46)
1 parent cbdea02 commit 6675607

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Calendar/Days.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const Days: React.FC<Props> = ({
210210
day >= 10 ? day : "0" + day
211211
}`;
212212

213-
if (!disabledDates || disabledDates?.length <= 0) {
213+
if (!disabledDates || (Array.isArray(disabledDates) && !disabledDates.length)) {
214214
return false;
215215
}
216216

0 commit comments

Comments
 (0)