From 483c3cc75832a7a86a8bb56316bd6646ae9d5255 Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 17 Jun 2025 12:26:24 +0200 Subject: [PATCH] dialog > comments : add condition to fix blocking error --- src/stores/dialog.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/stores/dialog.js b/src/stores/dialog.js index 87023ef..5a95339 100644 --- a/src/stores/dialog.js +++ b/src/stores/dialog.js @@ -138,11 +138,15 @@ export const useDialogStore = defineStore('dialog', () => { function highlight(comment) { const target = document.querySelector('#comment-' + comment.id); - target.classList.add('highlight'); + if (target) { + target.classList.add('highlight'); + } } function unhighlight(comment) { const target = document.querySelector('#comment-' + comment.id); - target.classList.remove('highlight'); + if (target) { + target.classList.remove('highlight'); + } } return {