mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +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) {
|
for (var i in curr.exdates) {
|
||||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
if( typeof (curr.exdates[i]) === "date") {
|
||||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||||
|
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
curr.rrule = rrulestr(rule);
|
curr.rrule = rrulestr(rule);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user