diff --git a/www/calendar/export.js b/www/calendar/export.js index e6662eee0..09f262756 100644 --- a/www/calendar/export.js +++ b/www/calendar/export.js @@ -52,7 +52,7 @@ define([ module.main = function (userDoc) { - var content = userDoc.content; + var content = userDoc.content || {}; var ICS = [ 'BEGIN:VCALENDAR', @@ -227,7 +227,7 @@ define([ if (ud.from) { // "From" updates are not supported by ICS: make a new event var _new = Util.clone(prev); - r.until = getICSDate(d - 1); // Stop previous recursion + r.until = d - 1; // Stop previous recursion delete r.count; addEvent(ICS, prev, null); // Add previous event Array.prototype.push.apply(ICS, toAdd); // Add individual updates