Fix error adding the first remote calendar.
authorJan Schneider <jan@horde.org>
Mon, 3 May 2010 16:05:36 +0000 (18:05 +0200)
committerJan Schneider <jan@horde.org>
Mon, 3 May 2010 16:38:03 +0000 (18:38 +0200)
kronolith/js/kronolith.js

index f42559d..c649a06 100644 (file)
@@ -3088,6 +3088,9 @@ KronolithCore = {
                 if (data.tags) {
                     cal.tg = data.tags.split(',');
                 }
+                if (!Kronolith.conf.calendars[type]) {
+                    Kronolith.conf.calendars[type] = [];
+                }
                 Kronolith.conf.calendars[type][r.response.calendar] = cal;
                 this.insertCalendarInList(type, r.response.calendar, cal);
             }