From 1c9f98a8f0366e5d356481e63a35161e9074ed70 Mon Sep 17 00:00:00 2001 From: zonemeen Date: Thu, 30 Nov 2023 09:44:29 +0800 Subject: [PATCH] refactor --- src/client/app/router.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index d9f5198b..8e31228c 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -166,11 +166,6 @@ export function createRouter( const button = (e.target as Element).closest('button') if (button) return - // temporary fix for #3264 - const currentUrl = window.location - if (siteDataRef.value.themeConfig?.logoLink === currentUrl.origin) - return - const link = (e.target as Element | SVGElement).closest< HTMLAnchorElement | SVGAElement >('a') @@ -186,6 +181,11 @@ export function createRouter( : link.href, link.baseURI ) + + // temporary fix for #3264 + if (siteDataRef.value.themeConfig?.logoLink === origin) return + + const currentUrl = window.location const mimeType = lookup(pathname) // only intercept inbound links if (