0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[ci] format

This commit is contained in:
tony-sull 2022-05-18 20:10:07 +00:00 committed by github-actions[bot]
parent 0d3c673dd9
commit f1d7d543b0
2 changed files with 5 additions and 4 deletions

View file

@ -194,9 +194,10 @@ async function handleRequest(
// When file-based build format is used, pages will be built to `/blog.html`
// rather than `/blog/index.html`. The dev server should handle this as well
// to match production deployments.
const url = config.build.format === 'file'
? new URL(origin + req.url?.replace(/(index)?\.html$/, ''))
: new URL(origin + req.url);
const url =
config.build.format === 'file'
? new URL(origin + req.url?.replace(/(index)?\.html$/, ''))
: new URL(origin + req.url);
const pathname = decodeURI(url.pathname);
const rootRelativeUrl = pathname.substring(devRoot.length - 1);
if (!buildingToSSR) {