From e81619e321457328a7078ff57e27e170ee99f98c Mon Sep 17 00:00:00 2001 From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:04:17 +0100 Subject: [PATCH] fix tags_used potentially undefined in store --- client/src/stores/userTagsStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/stores/userTagsStore.ts b/client/src/stores/userTagsStore.ts index 3c009c8f46d..47f717ddea0 100644 --- a/client/src/stores/userTagsStore.ts +++ b/client/src/stores/userTagsStore.ts @@ -11,7 +11,7 @@ export const useUserTagsStore = defineStore("userTagsStore", () => { const userTags = computed(() => { let tags: string[]; if (currentUser.value && !currentUser.value.isAnonymous) { - tags = [...currentUser.value.tags_used, ...localTags.value]; + tags = [...(currentUser.value.tags_used ?? []), ...localTags.value]; } else { tags = localTags.value; }