You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is sadly true for all mandatory fields in ical-generator. The reason for this is that ical-generator has always allowed you to use the setters, in this case email() for example, and you are not required to include all the data with the constructor. This is currently absolutely valid code, for example:
I understand that this is a bit weird, but I hope that the exceptions is meaningful enough. For the next breaking version it is already planned that at least the mandatory fields have to be passed to achieve some security here.
I just pushed a preview of ical-generator v6 to develop, which should fix this issue. I would be happy if you could test the new version and give me some feedback. You can install the version with npm i ical-generator@next. All changes in this release can be found here.
ical-generator version: 3.6.1
Recently tested simple email with attendees and discovered that none of falsy values are valid for email field in attendees array.
Tested values are: undefined, null, "" (empty string).
Example code
This example gives an error:
"No value for `email` in ICalAttendee given!"
CodeSandbox:
https://codesandbox.io/s/express-typescript-example-forked-94ujl7?file=/src/routes.ts
The text was updated successfully, but these errors were encountered: