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 {