Skip to content

Commit

Permalink
fix(client): do nothing on anchor elements with empty href
Browse files Browse the repository at this point in the history
closes #3950
  • Loading branch information
brc-dd committed Jun 9, 2024
1 parent 5d3ed87 commit 6461f5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/app/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ export function createRouter(
(link instanceof SVGElement || !link.download)
) {
const { target } = link
const linkHref = link.getAttribute('href')
if (linkHref == null) return
const { href, origin, pathname, hash, search } = new URL(
link.href instanceof SVGAnimatedString
? link.href.animVal
: link.href,
linkHref,
link.baseURI
)
const currentUrl = new URL(location.href) // copy to keep old data
Expand Down

0 comments on commit 6461f5d

Please sign in to comment.