Skip to content

Commit

Permalink
Fix tag-changelog-link on Safari (#3901)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jan 18, 2021
1 parent 34a6a8e commit e5153d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/features/tag-changelog-link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ async function getNextPage(): Promise<DocumentFragment> {
}

function parseTags(element: HTMLElement): TagDetails {
const {pathname: tagUrl} = select('a[href*="/releases/tag/"]', element)!;
// Safari doesn't correctly parse links if they're loaded via AJAX #3899
const {pathname: tagUrl} = new URL(select('a[href*="/releases/tag/"]', element)!.href);
const tag = /\/releases\/tag\/(.*)/.exec(tagUrl)![1];

return {
Expand Down

0 comments on commit e5153d5

Please sign in to comment.