From 54cf6ce51fcf8ce91c0706332e0b51ddcc2b519d Mon Sep 17 00:00:00 2001 From: yuhengshen Date: Sun, 9 Oct 2022 23:49:11 +0800 Subject: [PATCH] fix(router): don't intercept download links (#1452) --- src/client/app/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 89976ca412e..de55ab420fa 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -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+$/)