Zotero.Item::_collections is always an array

This commit is contained in:
Dan Stillman 2017-07-11 04:44:58 -04:00
parent 18f3c2cfb0
commit a982bd056d

View file

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