Skip to content

Commit

Permalink
fix null erros on conversation holder
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudchamb3r committed Oct 15, 2024
1 parent 5242e52 commit 58eaa35
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web_src/js/features/repo-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ export function initRepoIssueCommentDelete() {
const path = conversationHolder.getAttribute('data-path');
const side = conversationHolder.getAttribute('data-side');
const idx = conversationHolder.getAttribute('data-idx');
const lineType = conversationHolder.closest('tr').getAttribute('data-line-type');
const lineType = conversationHolder.closest('tr')?.getAttribute('data-line-type');

if (lineType === 'same') {
document.querySelector(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`).classList.remove('tw-invisible');
document.querySelector(`[data-path="${path}"] .add-code-comment[data-idx="${idx}"]`)?.classList.remove('tw-invisible');
} else {
document.querySelector(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`).classList.remove('tw-invisible');
document.querySelector(`[data-path="${path}"] .add-code-comment[data-side="${side}"][data-idx="${idx}"]`)?.classList.remove('tw-invisible');
}

conversationHolder.remove();
Expand Down

0 comments on commit 58eaa35

Please sign in to comment.