diff --git a/src/components/Menu.vue b/src/components/Menu.vue index b07db90..c27d76e 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -160,8 +160,11 @@ function collapse() { } function notificationCount() { - return user.value.notifications.map((notification) => notification.isRead) - .length; + const count = user.value.notifications.map( + (notification) => notification.isRead + ).length; + if (count === 0) return undefined; + return count; }