From f2676294c95695e2de3a7fb88eafae76d6827618 Mon Sep 17 00:00:00 2001 From: Florrie Date: Thu, 31 May 2018 00:00:45 -0300 Subject: Let-const nitpicks --- ui/DisplayElement.js | 4 ++-- ui/HorizontalBox.js | 2 +- ui/Root.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ui') diff --git a/ui/DisplayElement.js b/ui/DisplayElement.js index 3a97ed9..75263ac 100644 --- a/ui/DisplayElement.js +++ b/ui/DisplayElement.js @@ -64,7 +64,7 @@ module.exports = class DisplayElement extends EventEmitter { // Runs fixLayout on this as well as all children. this.fixLayout() - for (let child of this.children) { + for (const child of this.children) { child.fixAllLayout() } } @@ -72,7 +72,7 @@ module.exports = class DisplayElement extends EventEmitter { drawChildrenTo(writable) { // Draws all of the children to a writable. - for (let child of this.children) { + for (const child of this.children) { child.renderTo(writable) } } diff --git a/ui/HorizontalBox.js b/ui/HorizontalBox.js index fd43f8e..f92bf10 100644 --- a/ui/HorizontalBox.js +++ b/ui/HorizontalBox.js @@ -5,7 +5,7 @@ module.exports = class HorizontalBox extends DisplayElement { fixLayout() { let nextX = 0 - for (let child of this.children) { + for (const child of this.children) { child.x = nextX nextX = child.right + 1 } diff --git a/ui/Root.js b/ui/Root.js index d306a41..b0364e2 100644 --- a/ui/Root.js +++ b/ui/Root.js @@ -29,7 +29,7 @@ module.exports = class Root extends DisplayElement { handleData(buffer) { if (this.selected) { const els = this.selected.directAncestors.concat([this.selected]) - for (let el of els) { + for (const el of els) { if (el instanceof FocusElement) { const shouldBreak = (el.keyPressed(buffer) === false) if (shouldBreak) { -- cgit 1.3.0-6-gf8a5