1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 10:57:58 +01:00

Remove unnecessary use of values() when iterating over arrays.

This commit is contained in:
Doug Kearns
2015-05-11 23:56:31 +10:00
parent a8e70d3f43
commit 48acf656ec
27 changed files with 81 additions and 80 deletions

View File

@@ -635,7 +635,7 @@ var CommandLine = Module("commandline", {
},
hideCompletions: function hideCompletions() {
for (let nodeSet of values([this.widgets.statusbar, this.widgets.commandbar]))
for (let nodeSet of [this.widgets.statusbar, this.widgets.commandbar])
if (nodeSet.commandline.completionList)
nodeSet.commandline.completionList.visible = false;
},
@@ -2090,7 +2090,7 @@ var ItemList = Class("ItemList", {
updateOffsets: function updateOffsets() {
let total = this.itemCount;
let count = 0;
for (let group of values(this.activeGroups)) {
for (let group of this.activeGroups) {
group.offsets = { start: count, end: total - count - group.itemCount };
count += group.itemCount;
}
@@ -2105,7 +2105,8 @@ var ItemList = Class("ItemList", {
let container = DOM(this.nodes.completions);
let groups = this.activeGroups;
for (let group of values(groups)) {
for (let group of groups) {
group.reset();
container.append(group.nodes.root);
}
@@ -2148,7 +2149,7 @@ var ItemList = Class("ItemList", {
* @private
*/
draw: function draw() {
for (let group of values(this.activeGroups))
for (let group of this.activeGroups)
group.draw();
// We need to collect all of the rescrolling functions in