fix: don't copy custom preferences to default preferences

This commit is contained in:
Jake 2023-07-17 20:35:45 +02:00
parent 969e06e31e
commit dc73f8e3b1
8 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@
let pronouns: string | undefined;
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, user.custom_preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, user.custom_preferences);
const getPronouns = (member: PartialMember) => {
const filteredPronouns = member.pronouns.filter(

View File

@ -9,7 +9,7 @@
export let className: string | null = null;
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, preferences);
let currentPreference: CustomPreference;
$: currentPreference =

View File

@ -9,7 +9,7 @@
export let status: string;
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, preferences);
let currentPreference: CustomPreference;
$: currentPreference =

View File

@ -96,7 +96,7 @@
};
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, data.custom_preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, data.custom_preferences);
let favNames: FieldEntry[];
$: favNames = data.names.filter(

View File

@ -29,7 +29,7 @@
$: bio = renderMarkdown(data.bio);
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, data.user.custom_preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, data.user.custom_preferences);
let favNames: FieldEntry[];
$: favNames = data.names.filter(

View File

@ -21,7 +21,7 @@
let buttonElement: HTMLElement;
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, preferences);
let currentPreference: CustomPreference;
$: currentPreference =

View File

@ -25,7 +25,7 @@
const toggleDisplay = () => (displayOpen = !displayOpen);
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, preferences);
let currentPreference: CustomPreference;
$: currentPreference =

View File

@ -21,7 +21,7 @@
let buttonElement: HTMLElement;
let mergedPreferences: CustomPreferences;
$: mergedPreferences = Object.assign(defaultPreferences, preferences);
$: mergedPreferences = Object.assign({}, defaultPreferences, preferences);
let currentPreference: CustomPreference;
$: currentPreference =