dialog > comments : add condition to fix blocking error
This commit is contained in:
parent
8580fead7a
commit
483c3cc758
1 changed files with 6 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue