diff --git a/js/src/util/calendar.js b/js/src/util/calendar.js index dd8a9e831..e04ff7a98 100644 --- a/js/src/util/calendar.js +++ b/js/src/util/calendar.js @@ -812,13 +812,13 @@ export const getMonthDetails = (year, month, firstDayOfWeek) => { if ((index + 1) % 7 === 0) { const { weekNumber, year } = getISOWeekNumberAndYear(day.date) - const lastWeek = weeks.at(-1) + const lastWeek = weeks[weeks.length - 1] if (lastWeek) { lastWeek.week = { number: weekNumber, year } } } - const lastWeek = weeks.at(-1) + const lastWeek = weeks[weeks.length - 1] if (lastWeek) { lastWeek.days.push(day) }