summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);