Skip to content

Commit

Permalink
BasicsPage: fix "show language selector" default
Browse files Browse the repository at this point in the history
Since some boolean settings might be stored as string "0" or "1", the previous system no longer works, and it always sets the switch to true. The "no setting" check has been changed to reference `undefined`, so now the switch will only be defaulted to `true` if the setting truly hasn't been set.

Fixes #2574
  • Loading branch information
askvortsov1 committed Jan 27, 2021
1 parent 65b5c20 commit 9347b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/src/admin/components/BasicsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class BasicsPage extends Page {
}
});

if (typeof this.values.show_language_selector() !== 'number') this.values.show_language_selector(1);
if (this.values.show_language_selector() === undefined) this.values.show_language_selector(1);
}

view() {
Expand Down

0 comments on commit 9347b12

Please sign in to comment.