Fix remaining old-style array comprehensions
This commit is contained in:
parent
3071b8093b
commit
bf58ba6faa
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue