From c180bce0f0753f0080ab9e6cfe2ce4100b570998 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 4 Mar 2017 16:05:56 -0500 Subject: [PATCH] Check linked collections in both directions --- chrome/content/zotero/xpcom/collectionTreeView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index e3c0bb970b..df84a671b6 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -1811,7 +1811,7 @@ Zotero.CollectionTreeView.prototype.canDropCheckAsync = Zotero.Promise.coroutine // Dragging a collection to a different library if (treeRow.ref.libraryID != draggedCollection.libraryID) { // Disallow if linked collection already exists - if (yield draggedCollection.getLinkedCollection(treeRow.ref.libraryID)) { + if (yield draggedCollection.getLinkedCollection(treeRow.ref.libraryID, true)) { return false; } @@ -1822,7 +1822,7 @@ Zotero.CollectionTreeView.prototype.canDropCheckAsync = Zotero.Promise.coroutine // // If this is allowed in the future for the root collection, // need to allow drag only to root - if (yield descendent.getLinkedCollection(treeRow.ref.libraryID)) { + if (yield descendent.getLinkedCollection(treeRow.ref.libraryID, true)) { return false; } }