fixed a group moving bug

This commit is contained in:
antelle 2018-08-23 22:14:44 +02:00
parent 797bc4820b
commit 150f258b70
1 changed files with 1 additions and 1 deletions

View File

@ -315,7 +315,7 @@ const GroupModel = MenuItemModel.extend({
}
let atIndex = this.parentGroup.group.groups.indexOf(this.group);
const selfIndex = this.parentGroup.group.groups.indexOf(object.group);
if (selfIndex < atIndex) {
if (selfIndex >= 0 && selfIndex < atIndex) {
atIndex--;
}
if (atIndex >= 0) {