Fix "treeRow is undefined" error dragging to bottom of collections list
If you drag past the collections list the row is -1. Fixes #958
This commit is contained in:
parent
10181f7f56
commit
6afce0cf22
1 changed files with 5 additions and 0 deletions
|
@ -1432,6 +1432,11 @@ Zotero.CollectionTreeView.prototype.canDropCheck = function (row, orient, dataTr
|
||||||
var dataType = dragData.dataType;
|
var dataType = dragData.dataType;
|
||||||
var data = dragData.data;
|
var data = dragData.data;
|
||||||
|
|
||||||
|
// Empty space below rows
|
||||||
|
if (row == -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// For dropping collections onto root level
|
// For dropping collections onto root level
|
||||||
if (orient == 1 && row == 0 && dataType == 'zotero/collection') {
|
if (orient == 1 && row == 0 && dataType == 'zotero/collection') {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue