[ci] yarn format
This commit is contained in:
parent
4726e34408
commit
23735c53cc
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue