www

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

commit bf58ba6faaa2b0600858e81a03f60a23e4a9aaec
parent 3071b8093ba29c2d5089ae5c95cb8c86f865550a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 20 Jan 2016 01:26:05 -0500

Fix remaining old-style array comprehensions

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 4++--
Mchrome/content/zotero/xpcom/db.js | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -1861,7 +1861,7 @@ Zotero.Item.prototype.getNotes = function(includeTrashed) { return collation.compareString(1, aTitle, bTitle); }); } - var ids = [row.itemID for (row of rows)]; + var ids = rows.map(row => row.itemID); this._notes[cacheKey] = ids; return ids; } @@ -2907,7 +2907,7 @@ Zotero.Item.prototype.getAttachments = function(includeTrashed) { var collation = Zotero.getLocaleCollation(); rows.sort(function (a, b) collation.compareString(1, a.title, b.title)); } - var ids = [row.itemID for (row of rows)]; + var ids = rows.map(row => row.itemID); this._attachments[cacheKey] = ids; return ids; } diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js @@ -345,7 +345,7 @@ Zotero.DBConnection.prototype.rollbackAllTransactions = function () { Zotero.DBConnection.prototype.getColumns = function (table) { return Zotero.DB.queryAsync("PRAGMA table_info(" + table + ")") .then(function (rows) { - return [row.name for each (row in rows)]; + return rows.map(row => row.name); }) .catch(function (e) { this._debug(e, 1);