0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-03 22:29:08 -05:00

[ci] yarn format

This commit is contained in:
matthewp 2021-11-16 22:11:36 +00:00 committed by GitHub Actions
parent 0f9c191010
commit 887fad5a11

View file

@ -280,12 +280,12 @@ export class AstroDevServer {
let routePathname: string = pathname; let routePathname: string = pathname;
// If using a subpath, ensure that the user has included the pathname // If using a subpath, ensure that the user has included the pathname
// such as /blog in the URL. // such as /blog in the URL.
if(this.devRoot !== '/') { if (this.devRoot !== '/') {
if(pathname.startsWith(this.devRoot)) { if (pathname.startsWith(this.devRoot)) {
// This includes the subpath, so strip off the subpath so that // This includes the subpath, so strip off the subpath so that
// matchRoute finds this route. // matchRoute finds this route.
routePathname = pathname.substr(this.devRoot.length) || ''; routePathname = pathname.substr(this.devRoot.length) || '';
if(!routePathname.startsWith('/')) { if (!routePathname.startsWith('/')) {
routePathname = '/' + routePathname; routePathname = '/' + routePathname;
} }
} else { } else {