diff --git a/chrome/content/zotero/duplicatesMerge.js b/chrome/content/zotero/duplicatesMerge.js index 3c0947ffe1..2e71bd7fbb 100644 --- a/chrome/content/zotero/duplicatesMerge.js +++ b/chrome/content/zotero/duplicatesMerge.js @@ -33,7 +33,7 @@ var Zotero_Duplicates_Pane = new function () { this.setItems = function (items, displayNumItemsOnTypeError) { var itemTypeID, oldestItem, otherItems = []; - for each(var item in items) { + for (let item of items) { // Find the oldest item if (!oldestItem) { oldestItem = item; @@ -95,7 +95,7 @@ var Zotero_Duplicates_Pane = new function () { } var numRows = 0; - for each(var item in _items) { + for (let item of items) { var date = Zotero.Date.sqlToDate(item.dateAdded, true); dateList.appendItem(date.toLocaleString()); numRows++; diff --git a/chrome/content/zotero/xpcom/data/collections.js b/chrome/content/zotero/xpcom/data/collections.js index 7e220e225f..cce5f51382 100644 --- a/chrome/content/zotero/xpcom/data/collections.js +++ b/chrome/content/zotero/xpcom/data/collections.js @@ -143,7 +143,7 @@ Zotero.Collections = function() { var sql = "SELECT collectionID FROM collections WHERE "; var sqlParams = []; - for each(var id in itemIDs) { + for (let id of itemIDs) { sql += "collectionID IN (SELECT collectionID FROM collectionItems " + "WHERE itemID=?) AND " sqlParams.push(id); diff --git a/chrome/content/zotero/xpcom/duplicates.js b/chrome/content/zotero/xpcom/duplicates.js index 6c17eaff07..d0a066e10f 100644 --- a/chrome/content/zotero/xpcom/duplicates.js +++ b/chrome/content/zotero/xpcom/duplicates.js @@ -473,7 +473,8 @@ Zotero.DisjointSetForest.prototype.sameSet = function (x, y) { Zotero.DisjointSetForest.prototype.findAll = function (asIDs) { var objects = []; - for each(var obj in this._objects) { + for (let i in this._objects) { + let obj = this._objects[i]; objects.push(asIDs ? obj.id : obj); } return objects; @@ -483,7 +484,8 @@ Zotero.DisjointSetForest.prototype.findAll = function (asIDs) { Zotero.DisjointSetForest.prototype.findAllInSet = function (x, asIDs) { var xRoot = this.find(x); var objects = []; - for each(var obj in this._objects) { + for (let i in this._objects) { + let obj = this._objects[i]; if (this.find(obj) == xRoot) { objects.push(asIDs ? obj.id : obj); } diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 0c3084d4ea..552867bdbd 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -871,7 +871,7 @@ Zotero.Translate.ItemGetter.prototype = { // get attachments, although only urls will be passed if exportFileData is off returnItemArray.attachments = []; var attachments = returnItem.getAttachments(); - for each(var attachmentID in attachments) { + for (let attachmentID of attachments) { var attachment = Zotero.Items.get(attachmentID); var attachmentInfo = this._attachmentToArray(attachment);