From de32a70a2b6f2905a9d42360413da086a3702f90 Mon Sep 17 00:00:00 2001 From: Georges Gomes Date: Tue, 28 Dec 2021 15:25:22 +0100 Subject: [PATCH] Add comment --- src/client/app/router.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 7c56d631..4f41f2c3 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -42,12 +42,12 @@ export function createRouter( const route = reactive(getDefaultRoute()) function go(href: string = inBrowser ? location.href : '/') { + const url = new URL(href, fakeHost) // ensure correct deep link so page refresh lands on correct files. if (siteDataRef.value.cleanUrls) { - // TODO + // Should we replace `/foo.html` -> `/foo` ? :thinking: } else { - const url = new URL(href, fakeHost) if (!url.pathname.endsWith('/') && !url.pathname.endsWith('.html')) { url.pathname += '.html' href = url.pathname + url.search + url.hash