Merge pull request 'fix: don't copy custom preferences to default preferences' (#83) from fulmine/pronouns.cc:fix/custom-preferences into main

Reviewed-on: https://codeberg.org/pronounscc/pronouns.cc/pulls/83
This commit is contained in:
sam 2023-07-26 22:51:50 +00:00
commit f608b1046b
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 =