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:
parent
0f9c191010
commit
887fad5a11
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue