(fix) make sure empty categories are possible

pull/186/head
Ludovic Marcotte 2015-12-09 19:23:20 -05:00
parent fcf88444c9
commit 93ced64456
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@
}
function addCalendarCategory() {
if (!angular.isDefined(vm.preferences.defaults.SOGoCalendarCategoriesColors)) {
vm.preferences.defaults.SOGoCalendarCategoriesColors = {};
vm.preferences.defaults.SOGoCalendarCategories = [];
}
vm.preferences.defaults.SOGoCalendarCategoriesColors["New category"] = "#aaa";
vm.preferences.defaults.SOGoCalendarCategories.push("New category");
}