Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No toISOString function in exdate[name] #75

Closed
runely opened this issue Jan 4, 2021 · 5 comments
Closed

No toISOString function in exdate[name] #75

runely opened this issue Jan 4, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@runely
Copy link
Contributor

runely commented Jan 4, 2021

This is thrown when an EXDATE is date only: EXDATE:20400116

TypeError: No toISOString function in exdate[name]
    at /node_modules/node-ical/ical.js:278:17
    at Array.forEach (<anonymous>)
    at Object.EXDATE (/node_modules/node-ical/ical.js:270:11)
    at Object.handleObject (/node_modules/node-ical/ical.js:521:39)
    at Object.parseLines (/node_modules/node-ical/ical.js:575:18)
    at Object.parseICS (/node_modules/node-ical/ical.js:628:12)
    at Request._callback (/node_modules/node-ical/node-ical.js:114:12)
    at Request.self.callback (/node_modules/request/request.js:185:22)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
@runely
Copy link
Contributor Author

runely commented Jan 5, 2021

Added a PR with an ics file so there can be made a test, and this issue can be resolved

@camrun91
Copy link

camrun91 commented Jan 7, 2021

@jens-maus I can confirm I am getting this same error.

@runely
Copy link
Contributor Author

runely commented Jan 9, 2021

@jens-maus In this latest version, 0.12.7, this problem has come to the surface because the error is now thrown instead of logged to the console: replace all console.error() with proper "throw Error" returns to return

@runely
Copy link
Contributor Author

runely commented Jan 16, 2021

Updated the PR with a fix that works with the invalid calendar as well as all my calendars

@jens-maus
Copy link
Owner

Thanks for the PR. Merge it now after having applied a small fix/improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants