diff --git a/src/components/EventEdit.tsx b/src/components/EventEdit.tsx index 3d1630e..bd3c6d8 100644 --- a/src/components/EventEdit.tsx +++ b/src/components/EventEdit.tsx @@ -107,7 +107,7 @@ class EventEdit extends React.PureComponent { this.state.location = event.location ? event.location : ''; this.state.description = event.description ? event.description : ''; this.state.timezone = event.timezone; - this.state.rrule = this.props.item?.component.getFirstPropertyValue('rrule'); + this.state.rrule = this.props.item?.component.getFirstPropertyValue('rrule')?.toJSON(); } else { this.state.uid = uuid.v4(); } diff --git a/src/types/ical.js.d.ts b/src/types/ical.js.d.ts index 2af9689..fe42660 100644 --- a/src/types/ical.js.d.ts +++ b/src/types/ical.js.d.ts @@ -173,7 +173,8 @@ declare module 'ical.js' { public bysetpos?: number[]; } - export class Recur extends RecurData { + export class Recur { constructor(data?: RecurData); + public toJSON(): RecurData; } }