@lazerlen/legend-calendar 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1867,6 +1867,9 @@ var useCalendarList = (t0) => {
1867
1867
  let t3;
1868
1868
  if ($[10] !== calendarFirstDayOfWeek || $[11] !== calendarMaxDateId || $[12] !== monthList) {
1869
1869
  t3 = (numberOfMonths) => {
1870
+ if (numberOfMonths <= 0) {
1871
+ return monthList;
1872
+ }
1870
1873
  const startingMonth_0 = addMonths(monthList[monthList.length - 1].date, 1);
1871
1874
  const endingMonth_0 = getEndingMonth(Math.max(numberOfMonths - 1, 0), calendarMaxDateId, startingMonth_0);
1872
1875
  const hasReachedEndingMonth = monthList.find((m) => m.id === toDateId(endingMonth_0));
@@ -1892,6 +1895,9 @@ var useCalendarList = (t0) => {
1892
1895
  let t4;
1893
1896
  if ($[14] !== calendarFirstDayOfWeek || $[15] !== calendarMinDateId || $[16] !== monthList) {
1894
1897
  t4 = (numberOfMonths_0) => {
1898
+ if (numberOfMonths_0 <= 0) {
1899
+ return monthList;
1900
+ }
1895
1901
  const endingMonth_1 = subMonths(monthList[0].date, 1);
1896
1902
  const startingMonth_1 = getStartingMonth(Math.max(numberOfMonths_0 - 1, 0), calendarMinDateId, endingMonth_1);
1897
1903
  const hasReachedStartingMonth = monthList.find((m_0) => m_0.id === toDateId(startingMonth_1));