(js) Fix pos. of personal calendar after rename
This commit is contained in:
parent
44f748659e
commit
540ed1f63b
|
@ -93,8 +93,9 @@
|
||||||
list = this.$calendars;
|
list = this.$calendars;
|
||||||
|
|
||||||
sibling = _.find(list, function(o) {
|
sibling = _.find(list, function(o) {
|
||||||
return (o.id != 'personal' &&
|
return (calendar.id == 'personal' ||
|
||||||
o.name.localeCompare(calendar.name) === 1);
|
(o.id != 'personal' &&
|
||||||
|
o.name.localeCompare(calendar.name) === 1));
|
||||||
});
|
});
|
||||||
i = sibling ? _.indexOf(_.pluck(list, 'id'), sibling.id) : 1;
|
i = sibling ? _.indexOf(_.pluck(list, 'id'), sibling.id) : 1;
|
||||||
list.splice(i, 0, calendar);
|
list.splice(i, 0, calendar);
|
||||||
|
|
Loading…
Reference in a new issue