jkbrzt / rrule

JavaScript library for working with recurrence rules for calendar dates as defined in the iCalendar RFC and more.

Home Page:https://jkbrzt.github.io/rrule

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read properties of undefined (reading 'n')\n at parseOptions

hendurhance opened this issue · comments

Reporting an issue

Rule options by DTO:

const rruleOptions ={
  freq: 2,
  interval: 1,
  dtstart: 2024-06-23T07:00:00.000Z,
  wkst: Weekday { weekday: 7, n: undefined },
  count: 2,
  until: undefined,
  byweekday: [
    Weekday { weekday: 6, n: undefined },
    Weekday { weekday: 0, n: undefined }
  ]
}

Rule options by Existing Booking:

const rruleOptions ={
  freq: 1,
  interval: 1,
  dtstart: 2024-06-24T12:00:00.000Z,
  wkst: Weekday { weekday: 7, n: undefined },
  count: 5,
  until: undefined,
  bymonthday: [ 5 ]
}

I get error: "TypeError: Cannot read properties of undefined (reading 'n')\n at parseOptions .../node_modules/rrule/dist/es5/rrule.js:2091:23)\n at new RRule .../node_modules/rrule/dist/es5/rrule.js:3168:29)\n

  • Version: "rrule": "^2.8.1"
  • MaxOS
    -Timezone: WAT