(js) Fix pos. of personal calendar after rename

pull/201/head
Francis Lachapelle 2016-03-03 09:29:12 -05:00
parent 44f748659e
commit 540ed1f63b
1 changed files with 3 additions and 2 deletions

View File

@ -93,8 +93,9 @@
list = this.$calendars;
sibling = _.find(list, function(o) {
return (o.id != 'personal' &&
o.name.localeCompare(calendar.name) === 1);
return (calendar.id == 'personal' ||
(o.id != 'personal' &&
o.name.localeCompare(calendar.name) === 1));
});
i = sibling ? _.indexOf(_.pluck(list, 'id'), sibling.id) : 1;
list.splice(i, 0, calendar);