Skip to content

Commit

Permalink
fix(router): don't intercept download links (#1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhengshen authored Oct 9, 2022
1 parent 067e1a9 commit 54cf6ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/app/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function createRouter(
if (button) return

const link = (e.target as Element).closest('a')
if (link && !link.closest('.vp-raw')) {
if (link && !link.closest('.vp-raw') && !link.download) {
const { href, origin, pathname, hash, search, target } = link
const currentUrl = window.location
const extMatch = pathname.match(/\.\w+$/)
Expand Down

0 comments on commit 54cf6ce

Please sign in to comment.