Skip to content

Commit

Permalink
feat: no need check url extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
sumy7 committed Apr 11, 2024
1 parent c7ec49d commit 62e9a38
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/shared/src/runtime-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 62e9a38

Please sign in to comment.