From d60c29f6b54311f2d05ece703e441e25371b1468 Mon Sep 17 00:00:00 2001 From: zonemeen Date: Wed, 29 Nov 2023 19:03:19 +0800 Subject: [PATCH] fix: custom home page with setting logoLink leads to 404 page --- src/client/app/router.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 3a7d8cb5..d9f5198b 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -166,6 +166,11 @@ 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') @@ -181,7 +186,6 @@ export function createRouter( : link.href, link.baseURI ) - const currentUrl = window.location const mimeType = lookup(pathname) // only intercept inbound links if (