www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a982bd056d029c65fafba797887fb5bee0eab027
parent 18f3c2cfb006a1028dd444784338eb0b3433e4b1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 11 Jul 2017 04:44:58 -0400

Zotero.Item::_collections is always an array

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -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;