Skip to content

Commit

Permalink
Fix settings parsing bug in some browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonAlling committed Mar 12, 2017
1 parent 723706e commit 1f06682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/GUIController.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ function GUIController(cfg) {
const newSettings = [];
// <input> elements:
const inputs = settingsForm.querySelectorAll("input");
inputs.forEach((input) => {
Array.from(inputs).forEach((input) => {
if (input.type === "checkbox") {
// checkbox
newSettings.push({ key: input.dataset.key, value: input.checked });
Expand All @@ -225,7 +225,7 @@ function GUIController(cfg) {
});
// <select> elements:
const selects = settingsForm.querySelectorAll("select");
selects.forEach((select) => {
Array.from(selects).forEach((select) => {
newSettings.push({ key: select.dataset.key, value: select.options[select.selectedIndex].value });
});
return newSettings;
Expand Down

0 comments on commit 1f06682

Please sign in to comment.