From 6afce0cf220bb4ed589239e63e3b87c1a74332fc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 30 Apr 2016 17:12:56 -0400 Subject: [PATCH] Fix "treeRow is undefined" error dragging to bottom of collections list If you drag past the collections list the row is -1. Fixes #958 --- chrome/content/zotero/xpcom/collectionTreeView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index 32bb822570..1b4a170092 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -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;