fix unreadNotification

This commit is contained in:
isUnknown 2025-10-08 14:58:29 +02:00
parent 4054c54e57
commit d552b6bf5e

View file

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