aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-25 21:58:12 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-25 22:13:06 -0500
commitb391704f3db77f19aad7e1a4e61b515a18475024 (patch)
treee4e6a672cbba6e5a52cb3a7056aeb6557170e5d2 /ext/bg/js
parent7b97138ad1242ab51206f5d35247da3a9ccd905d (diff)
Use for of
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/audio.js4
-rw-r--r--ext/bg/js/backend.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js
index d300570b..972e2b8b 100644
--- a/ext/bg/js/audio.js
+++ b/ext/bg/js/audio.js
@@ -156,8 +156,8 @@ function audioBuildFilename(definition) {
async function audioInject(definition, fields, sources, optionsContext) {
let usesAudio = false;
- for (const name in fields) {
- if (fields[name].includes('{audio}')) {
+ for (const fieldValue of Object.values(fields)) {
+ if (fieldValue.includes('{audio}')) {
usesAudio = true;
break;
}
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 717ffac3..6736b1ae 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -719,8 +719,8 @@ class Backend {
async _injectScreenshot(definition, fields, screenshot) {
let usesScreenshot = false;
- for (const name in fields) {
- if (fields[name].includes('{screenshot}')) {
+ for (const fieldValue of Object.values(fields)) {
+ if (fieldValue.includes('{screenshot}')) {
usesScreenshot = true;
break;
}