Fix deleting collection with items

This commit is contained in:
Aurimas Vinckevicius 2015-06-02 18:28:46 -05:00
parent 07ca00edd5
commit 1621f5772b

View File

@ -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);
}
}