Skip to content

Commit

Permalink
Zotero.Item::_collections is always an array
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Jul 11, 2017
1 parent 18f3c2c commit a982bd0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions chrome/content/zotero/xpcom/data/item.js
Expand Up @@ -4002,11 +4002,9 @@ Zotero.Item.prototype._eraseData = Zotero.Promise.coroutine(function* (env) {

// Remove item from parent collections
var parentCollectionIDs = this._collections;
if (parentCollectionIDs) {
for (var i=0; i<parentCollectionIDs.length; i++) {
let parentCollection = yield Zotero.Collections.getAsync(parentCollectionIDs[i]);
yield parentCollection.removeItem(this.id);
}
for (let parentCollectionID of parentCollectionIDs) {
let parentCollection = yield Zotero.Collections.getAsync(parentCollectionID);
yield parentCollection.removeItem(this.id);
}

var parentItem = this.parentKey;
Expand Down

0 comments on commit a982bd0

Please sign in to comment.