Commit 2ed86ca6 authored by Mark Stenglein's avatar Mark Stenglein Committed by GitHub
Browse files

Fix issue with date exclusion

Basically, I'm new to js and just learned typeof doesn't work with dates. I'm pretty sure there's a less atrocious way to check this, but it's what I've got now.
parent 856e5bc0
......@@ -353,12 +353,12 @@ var ICalEvent = function(_data, calendar) {
data.repeating.exclude = [];
repeating.exclude.forEach(function(excludedDate) {
if(typeof excludedDate !== 'date') {
if(Object.prototype.toString.call(excludedDate) === '[object Date]') {
throw '`repeating.exclude` contains invalid value `' + excludedDate + '`!';
}
data.repeating.excludedDate.push(excludedDate);
})
});
}
return this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment