From 798517cdf1e346e43e66b2afb43cdf4bda1106e9 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 25 Feb 2020 21:22:54 -0500 Subject: [PATCH] Use for of --- ext/mixed/js/display.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 5d3076ee..12829650 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -520,15 +520,13 @@ class Display { updateAdderButtons(states) { for (let i = 0; i < states.length; ++i) { - const state = states[i]; let noteId = null; - for (const mode in state) { + for (const [mode, info] of Object.entries(states[i])) { const button = this.adderButtonFind(i, mode); if (button === null) { continue; } - const info = state[mode]; if (!info.canAdd && noteId === null && info.noteId) { noteId = info.noteId; }