mirror of
https://github.com/flarum/core.git
synced 2025-01-17 22:29:15 +01:00
BasicsPage: fix "show language selector" default
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 https://github.com/flarum/core/issues/2574
This commit is contained in:
parent
65b5c2043c
commit
9347b12b47
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user