Skip to content

Commit 307775e

Browse files
committed
[Fix] helpers getNumberOfDay allow startWeekOn be null | undefined
1 parent 6675607 commit 307775e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/helpers/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ export function getLastElementsInArray(array: number[] = [], size = 0) {
130130
return result.reverse();
131131
}
132132

133-
export function getNumberOfDay(dayString: string, i18n: string, startWeekOn?: string): number {
133+
export function getNumberOfDay(
134+
dayString: string,
135+
i18n: string,
136+
startWeekOn?: string | null | undefined
137+
): number {
134138
let number = 0;
135139

136140
let startDateModifier = 7 - dayjs().locale(i18n).weekday(0).get("day");

0 commit comments

Comments
 (0)