Skip to content

Commit

Permalink
Check linked collections in both directions
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Mar 4, 2017
1 parent d0d7aec commit c180bce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/content/zotero/xpcom/collectionTreeView.js
Expand Up @@ -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;
}

Expand All @@ -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;
}
}
Expand Down

0 comments on commit c180bce

Please sign in to comment.