From 14d969abb3177bb8a0034ed5647975afc66d87cb Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Wed, 7 Jun 2017 18:23:07 +0800 Subject: [PATCH] Use for-of instead of .forEach --- webext-options-sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webext-options-sync.js b/webext-options-sync.js index f5b32a0..c1eb9c5 100644 --- a/webext-options-sync.js +++ b/webext-options-sync.js @@ -60,7 +60,7 @@ class OptSync { } static _applyToForm(options, form) { - Object.keys(options).forEach(name => { + for (const name of Object.keys(options)) { const options = form.querySelectorAll(`[name="${name}"]`); const [field] = options; if (field) { @@ -84,7 +84,7 @@ class OptSync { } else { console.warn('Stored option {', name, ':', options[name], '} was not found on the page'); } - }); + } } _handleFormUpdates(e) {