Skip to content

Commit

Permalink
Use for-of instead of .forEach
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jun 7, 2017
1 parent eb4ae29 commit 14d969a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webext-options-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -84,7 +84,7 @@ class OptSync {
} else {
console.warn('Stored option {', name, ':', options[name], '} was not found on the page');
}
});
}
}

_handleFormUpdates(e) {
Expand Down

0 comments on commit 14d969a

Please sign in to comment.