From 1621f5772b4a01fe52e50008d082a14242e1cdb1 Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 2 Jun 2015 18:28:46 -0500 Subject: [PATCH] Fix deleting collection with items --- chrome/content/zotero/xpcom/data/collection.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js index c94f5ad47..581c61614 100644 --- a/chrome/content/zotero/xpcom/data/collection.js +++ b/chrome/content/zotero/xpcom/data/collection.js @@ -583,8 +583,6 @@ Zotero.Collection.prototype.clone = function (includePrimary, newCollection) { Zotero.Collection.prototype._eraseData = Zotero.Promise.coroutine(function* (env) { Zotero.DB.requireTransaction(); - var includeItems = env.options.deleteItems; - var collections = [this.id]; var descendents = yield this.getDescendents(false, null, true); @@ -606,7 +604,7 @@ Zotero.Collection.prototype._eraseData = Zotero.Promise.coroutine(function* (env // Descendent items else { // Delete items from DB - if (deleteItems) { + if (env.options.deleteItems) { del.push(descendents[i].id); } }