fix: prevent greetings with "undefined" name

This commit is contained in:
Phan An 2023-04-18 22:12:19 +02:00
parent e9fdc02485
commit 922bb04803

View file

@ -66,7 +66,7 @@ const greetings = [
'How have you been, %s?'
]
const greeting = computed(() => sample(greetings)!.replace('%s', userStore.current?.name))
const greeting = computed(() => userStore.current ? sample(greetings)!.replace('%s', userStore.current.name) : '')
const libraryEmpty = computed(() => commonStore.state.song_length === 0)
const loading = ref(false)