mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
curr.exdates[i] might not be a date, so toISOString() may fail too
This commit is contained in:
parent
ec65e66c58
commit
964504b9c3
@ -43,8 +43,10 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){
|
||||
}
|
||||
}
|
||||
for (var i in curr.exdates) {
|
||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
if( typeof (curr.exdates[i]) === "date") {
|
||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||
}
|
||||
}
|
||||
try {
|
||||
curr.rrule = rrulestr(rule);
|
||||
|
Loading…
x
Reference in New Issue
Block a user