Fix deleting collection with items
This commit is contained in:
parent
07ca00edd5
commit
1621f5772b
|
@ -583,8 +583,6 @@ Zotero.Collection.prototype.clone = function (includePrimary, newCollection) {
|
||||||
Zotero.Collection.prototype._eraseData = Zotero.Promise.coroutine(function* (env) {
|
Zotero.Collection.prototype._eraseData = Zotero.Promise.coroutine(function* (env) {
|
||||||
Zotero.DB.requireTransaction();
|
Zotero.DB.requireTransaction();
|
||||||
|
|
||||||
var includeItems = env.options.deleteItems;
|
|
||||||
|
|
||||||
var collections = [this.id];
|
var collections = [this.id];
|
||||||
|
|
||||||
var descendents = yield this.getDescendents(false, null, true);
|
var descendents = yield this.getDescendents(false, null, true);
|
||||||
|
@ -606,7 +604,7 @@ Zotero.Collection.prototype._eraseData = Zotero.Promise.coroutine(function* (env
|
||||||
// Descendent items
|
// Descendent items
|
||||||
else {
|
else {
|
||||||
// Delete items from DB
|
// Delete items from DB
|
||||||
if (deleteItems) {
|
if (env.options.deleteItems) {
|
||||||
del.push(descendents[i].id);
|
del.push(descendents[i].id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user