Skip to content

Commit

Permalink
Fix console error in clean-conversation-headers (#4421)
Browse files Browse the repository at this point in the history
  • Loading branch information
yakov116 committed Jun 3, 2021
1 parent addd5ab commit 3649018
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/features/clean-conversation-headers.tsx
Expand Up @@ -27,14 +27,15 @@ async function initIssue(): Promise<void> {
}

async function initPR(): Promise<void> {
const byline = await elementReady('.gh-header-meta .flex-auto:not(.rgh-clean-conversation-header)');
if (!byline) {
const author = await elementReady('.gh-header-meta .flex-auto:not(.rgh-clean-conversation-header) .author');
if (!author) {
return;
}

const byline = author.closest<HTMLElement>('.flex-auto')!;

byline.classList.add('rgh-clean-conversation-header');

const author = select('.author', byline)!;
const isSameAuthor = pageDetect.isPRConversation() && author.textContent === (await elementReady('.TimelineItem .author'))!.textContent;

const [base, headBranch] = select.all('.commit-ref', byline)!;
Expand Down

0 comments on commit 3649018

Please sign in to comment.