1
0
mirror of https://github.com/keeweb/keeweb.git synced 2024-06-26 07:39:04 +02:00

fixed a group moving bug

This commit is contained in:
antelle 2018-08-23 22:14:44 +02:00
parent 797bc4820b
commit 150f258b70

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) {