diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 6b09277..4b99489 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -127,9 +127,9 @@ const { page } = storeToRefs(usePageStore()); const unreadNotificationsCount = computed(() => { if (!user.value) return undefined; - const count = notifications.value.filter( - (notification) => !notification.isRead - ).length; + const count = + notifications.value.filter((notification) => !notification.isRead).length || + 0; if (count === 0) return undefined; return count; }); @@ -320,7 +320,7 @@ button[aria-controls='menu'][aria-expanded='false'] align-items: center; width: 100%; min-height: 2.5rem; /* 40px */ - padding: .66rem var(--space-16); + padding: 0.66rem var(--space-16); gap: var(--space-12); border-radius: var(--rounded-lg); } diff --git a/src/stores/projects.js b/src/stores/projects.js index c61f052..5f7ff94 100644 --- a/src/stores/projects.js +++ b/src/stores/projects.js @@ -7,9 +7,11 @@ export const useProjectsStore = defineStore('projects', () => { const projects = ref(null); const currentProjects = computed(() => { - return projects.value - .filter((project) => project.status === 'listed') - .sort((a, b) => new Date(b.modified) - new Date(a.modified)); + return ( + projects.value + .filter((project) => project.status === 'listed') + .sort((a, b) => new Date(b.modified) - new Date(a.modified)) || [] + ); }); const draftProjects = computed(() => {