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:
Dan Stillman 2016-04-30 17:12:56 -04:00
parent 10181f7f56
commit 6afce0cf22

View file

@ -1432,6 +1432,11 @@ Zotero.CollectionTreeView.prototype.canDropCheck = function (row, orient, dataTr
var dataType = dragData.dataType;
var data = dragData.data;
// Empty space below rows
if (row == -1) {
return false;
}
// For dropping collections onto root level
if (orient == 1 && row == 0 && dataType == 'zotero/collection') {
return true;