From 62e9a387bb90eab2c29f023407281570ea734e4e Mon Sep 17 00:00:00 2001 From: sumy Date: Thu, 11 Apr 2024 08:58:40 +0800 Subject: [PATCH] feat: no need check url extension. --- packages/shared/src/runtime-utils/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/shared/src/runtime-utils/index.ts b/packages/shared/src/runtime-utils/index.ts index dee89cf14..ec4a713a9 100644 --- a/packages/shared/src/runtime-utils/index.ts +++ b/packages/shared/src/runtime-utils/index.ts @@ -242,9 +242,7 @@ export function normalizeHref(url?: string, cleanUrls = false) { // eslint-disable-next-line prefer-const let { url: cleanUrl, hash } = parseUrl(decodeURIComponent(url)); - const hasHtmlExt = cleanUrl.endsWith('.html'); - - if (!cleanUrls && !cleanUrl.endsWith('.html') && !hasHtmlExt) { + if (!cleanUrls && !cleanUrl.endsWith('.html')) { if (cleanUrl.endsWith('/')) { cleanUrl += 'index.html'; } else {