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 = [