diff --git a/src/lib/mono/forms/TextArea.svelte b/src/lib/mono/forms/TextArea.svelte index 852216f8..88c1e22e 100644 --- a/src/lib/mono/forms/TextArea.svelte +++ b/src/lib/mono/forms/TextArea.svelte @@ -44,7 +44,7 @@ size = 'md', id = generateID(), rows = 4, - element = $bindable(undefined), + element = $bindable(), class: clazz = '', customLabel, suffix, diff --git a/src/lib/settings.svelte.ts b/src/lib/settings.svelte.ts index 3460e647..5e28ac0b 100644 --- a/src/lib/settings.svelte.ts +++ b/src/lib/settings.svelte.ts @@ -212,12 +212,18 @@ if (typeof window != 'undefined') { } $effect.root(() => { - if (typeof window != 'undefined') { - localStorage.setItem('settings', JSON.stringify(settings)) - } - if (settings.language) { - locale.set(settings.language) - } else { - if (browser) locale.set(navigator?.language) + $effect(() => { + if (typeof window != 'undefined') { + localStorage.setItem('settings', JSON.stringify(settings)) + } + if (settings.language) { + locale.set(settings.language) + } else { + if (browser) locale.set(navigator?.language) + } + }) + + return () => { + } }) \ No newline at end of file diff --git a/src/lib/translations.ts b/src/lib/translations.ts index c3540a58..5089ac40 100644 --- a/src/lib/translations.ts +++ b/src/lib/translations.ts @@ -111,6 +111,6 @@ export const aliases = new Map([ ['he-IL', 'he'], ]) -export const { t, locale, locales, loading, loadTranslations } = new i18n( +export let { t, locale, locales, loading, loadTranslations } = new i18n( config )