mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-26 00:50:56 -05:00
fix(settings): persist false-y values
This commit is contained in:
parent
301070a3cb
commit
bb707fb287
2 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,8 @@ export default class Settings
|
|||
@action hydrate(data: ISettings) {
|
||||
Object.keys(data).forEach(
|
||||
(key) =>
|
||||
(data as any)[key] && this.data.set(key, (data as any)[key]),
|
||||
typeof (data as any)[key] !== "undefined" &&
|
||||
this.data.set(key, (data as any)[key]),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ export default observer(() => {
|
|||
!state.settings.get("appearance:seasonal"),
|
||||
);
|
||||
|
||||
const seasonalTheme = state.settings.get("appearance:seasonal") ?? true;
|
||||
const seasonalTheme = state.settings.get("appearance:seasonal", true);
|
||||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||
const snowflakes = useMemo(() => {
|
||||
const flakes = [];
|
||||
|
|
Loading…
Reference in a new issue