Fix: don't crash if 't' is undefined

This commit is contained in:
Pieter Vander Vennet 2023-12-13 00:53:31 +01:00
parent 55a6cda062
commit b1c4097cb4

View file

@ -9,12 +9,12 @@
export let t: Translation
export let cls: string = ""
// Text for the current language
let txt: Store<string | undefined> = t.current
let txt: Store<string | undefined> = t?.current
</script>
{#if t}
{#if txt}
<span class={cls}>
{$txt}
<WeblateLink context={t.context} />