Skip to content

Commit

Permalink
fix(youtrack): Fix YouTrack issue element selectors
Browse files Browse the repository at this point in the history
Closes #2319
  • Loading branch information
pkvach committed Jan 24, 2025
1 parent 3e50635 commit ba2d075
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/content/youtrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@ togglbutton.render(
{ observe: true },
function (elem) {
const reporterInfo = elem.querySelector('[data-test="reporter-info"]')

if (reporterInfo === null) {
console.log('Toggl Button: Reporter info not found.')
return
}

const reporterInfoContainer = reporterInfo.parentElement

const issueId = $('.idLink__ee62').textContent.trim()
const issueId = reporterInfoContainer.querySelector('a[href*="issue/"]').textContent.trim()
const issueTitle = $('h1').textContent.trim()

const link = togglbutton.createTimerLink({
Expand Down

0 comments on commit ba2d075

Please sign in to comment.