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
|
// Remove item from parent collections
|
||||||
var parentCollectionIDs = this._collections;
|
var parentCollectionIDs = this._collections;
|
||||||
if (parentCollectionIDs) {
|
for (let parentCollectionID of parentCollectionIDs) {
|
||||||
for (var i=0; i<parentCollectionIDs.length; i++) {
|
let parentCollection = yield Zotero.Collections.getAsync(parentCollectionID);
|
||||||
let parentCollection = yield Zotero.Collections.getAsync(parentCollectionIDs[i]);
|
yield parentCollection.removeItem(this.id);
|
||||||
yield parentCollection.removeItem(this.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var parentItem = this.parentKey;
|
var parentItem = this.parentKey;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue