From f4670122411653ec17bdd5fb704288fc275f562e Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 18 Nov 2024 09:47:42 +0100 Subject: [PATCH] fix corresponding notification --- src/components/comments/Comment.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/comments/Comment.vue b/src/components/comments/Comment.vue index 0641515..ee82921 100644 --- a/src/components/comments/Comment.vue +++ b/src/components/comments/Comment.vue @@ -75,11 +75,10 @@ const status = computed(() => { const correspondingNotification = userStore.notifications.find( (notification) => notification.id === comment.id ); - if (!correspondingNotification.isRead) { + if (correspondingNotification && !correspondingNotification.isRead) { return "unread"; - } else { - return undefined; } + return undefined; }); function formatDate() {