From d552b6bf5ec71ba1618fd2238abf55b68c993e4a Mon Sep 17 00:00:00 2001 From: isUnknown Date: Wed, 8 Oct 2025 14:58:29 +0200 Subject: [PATCH] fix unreadNotification --- src/components/Menu.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 4b99489..65aa5a3 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -126,12 +126,13 @@ const { isEmptyBrief } = useProjectStore(); const { page } = storeToRefs(usePageStore()); const unreadNotificationsCount = computed(() => { - if (!user.value) return undefined; + if (!user.value) return 0; + const count = - notifications.value.filter((notification) => !notification.isRead).length || - 0; - if (count === 0) return undefined; - return count; + notifications.value?.filter((notification) => !notification.isRead) + .length ?? 0; + + return count === 0 ? 0 : count; }); const mainItems = [