mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 12:39:45 +00:00
curr.start is not always a date type (depends on ics file). A type check
has been added.
This commit is contained in:
parent
caf56671dc
commit
e694b080be
@ -37,8 +37,10 @@ ical.objectHandlers['END'] = function(val, params, curr, stack){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rule += ' DTSTART:' + curr.start.toISOString().replace(/[-:]/g, '');
|
if( typeof (curr.start) === "date") {
|
||||||
rule = rule.replace(/\.[0-9]{3}/, '');
|
rule += ' DTSTART:' + curr.start.toISOString().replace(/[-:]/g, '');
|
||||||
|
rule = rule.replace(/\.[0-9]{3}/, '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (var i in curr.exdates) {
|
for (var i in curr.exdates) {
|
||||||
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
rule += ' EXDATE:' + curr.exdates[i].toISOString().replace(/[-:]/g, '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user