-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
uncaught exception: No toISOString function in exdate[name] #172
Comments
Got the same error, any updates @jens-maus ? |
Can you try to get a minimal ics File that can reproduce this error? Tis error happensd when exDate is somehow strange becaue it contains something BUT mot a valid date object, so finding the reason would be ideal |
@marsmaennchen @xRealNeon I had to put a fix in our application as the dates are returned from rrule.between() , not by ical.
|
this should be closed as a dup of |
I am getting this error after updating to a new version of node-ical. I have isolated the version in which the behavior changed, it changed between 0.12.6 and 0.12.7. The attached code will recreate the error (works in versions earlier than 0.12.7)
|
ok, this is a bad ics format.. has dual DTSTART/DTEND and RRULE.. so processes twice..per event how to handle? the error is thrown because the curr.start is an array of dates... not a date object for test
but this only catches start... end shows same duplicate problem (if no start)
so, I propose this
this doesn't work with DTEND hooked @jens-maus what do you think? I sort of think this is an invalid testcase.. badly formatted ics, |
this works for both DTSTART(value, parameters, curr, stack) {
if(curr.start ==undefined){
curr = dateParameter('start')(value, parameters, curr, stack);
return typeParameter('datetype')(value, parameters, curr);
}
else {
throw new Error('duplicate DTSTART encountered', curr.start);
}
},
DTEND(value, parameters, curr, stack){
if(curr.end ==undefined){
return dateParameter('end')(value, parameters, curr, stack);
}
else {
throw new Error('duplicate DTEND encountered', curr.start);
}
}, |
No toISOString function in exdate[name]
TypeError: No toISOString function in exdate[name] at Object.EXDATE (/opt/iobroker/node_modules/node-ical/ical.js:299:17) at Object.handleObject (/opt/iobroker/node_modules/node-ical/ical.js:571:39) at Object.parseLines (/opt/iobroker/node_modules/node-ical/ical.js:623:18) at Immediate.<anonymous> (/opt/iobroker/node_modules/node-ical/ical.js:638:16) at processImmediate (internal/timers.js:464:21)
The text was updated successfully, but these errors were encountered: