Zotero.Item::_collections is always an array
This commit is contained in:
parent
18f3c2cfb0
commit
a982bd056d
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue