summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2021-07-26 18:43:29 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-07-26 18:43:29 +0000
commit23735c53cc59e489cf1d0f528a97c2ce535d0a21 (patch)
tree1925afd956873d41fafd65e38598a6a1b5c6dfab
parent4726e344088180a9019408cfecab485f1eebd753 (diff)
downloadastro-23735c53cc59e489cf1d0f528a97c2ce535d0a21.tar.gz
astro-23735c53cc59e489cf1d0f528a97c2ce535d0a21.tar.zst
astro-23735c53cc59e489cf1d0f528a97c2ce535d0a21.zip
[ci] yarn format
-rw-r--r--packages/astro/src/build/util.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/astro/src/build/util.ts b/packages/astro/src/build/util.ts
index 8314b9308..3c74086e2 100644
--- a/packages/astro/src/build/util.ts
+++ b/packages/astro/src/build/util.ts
@@ -11,7 +11,7 @@ export function canonicalURL(url: string, base?: string): URL {
pathname = pathname.replace(/\/1\/?$/, ''); // neither is a trailing /1/ (impl. detail of collections)
if (!path.extname(pathname)) pathname = pathname.replace(/(\/+)?$/, '/'); // add trailing slash if there’s no extension
pathname = pathname.replace(/\/+/g, '/'); // remove duplicate slashes (URL() won’t)
- if(base) {
+ if (base) {
return new URL('.' + pathname, base);
} else {
return new URL(pathname, base);