summaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-25 21:22:54 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-25 22:11:58 -0500
commit798517cdf1e346e43e66b2afb43cdf4bda1106e9 (patch)
treeaff19422d6979fb30e295f9822469a51114c77d4 /ext/mixed/js
parent2e0b3a6ccc50eae3b86e8cc82c623d95a9defdaf (diff)
Use for of
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/display.js4
1 files changed, 1 insertions, 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;
}