Fix Zotero crash if last collection before a separator was deleted
This commit is contained in:
parent
a6b8633f2e
commit
e82a56bb4c
1 changed files with 8 additions and 2 deletions
|
@ -868,11 +868,17 @@ Zotero.CollectionTreeView.prototype.deleteSelection = function()
|
||||||
}
|
}
|
||||||
this._treebox.endUpdateBatch();
|
this._treebox.endUpdateBatch();
|
||||||
|
|
||||||
if(end.value < this.rowCount)
|
if (end.value < this.rowCount) {
|
||||||
|
var row = this._getItemAtRow(end.value);
|
||||||
|
if (row.isSeparator()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.selection.select(end.value);
|
this.selection.select(end.value);
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
this.selection.select(this.rowCount-1);
|
this.selection.select(this.rowCount-1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Called by various view functions to show a row
|
* Called by various view functions to show a row
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue