Fix indents
This commit is contained in:
parent
a4838c7ee4
commit
72d194f7a1
1 changed files with 11 additions and 13 deletions
|
@ -37,7 +37,7 @@ import { deleteFile } from "./delete-file.js";
|
||||||
|
|
||||||
const logger = driveLogger.createSubLogger("register", "yellow");
|
const logger = driveLogger.createSubLogger("register", "yellow");
|
||||||
|
|
||||||
type PathPartLike = string | null
|
type PathPartLike = string | null;
|
||||||
|
|
||||||
// Joins an array of elements into a URL pathname, possibly with a base URL object to append to.
|
// Joins an array of elements into a URL pathname, possibly with a base URL object to append to.
|
||||||
// Null or 0-length parts will be left out.
|
// Null or 0-length parts will be left out.
|
||||||
|
@ -52,15 +52,13 @@ function urlPathJoin(
|
||||||
url.pathname.endsWith("/") ? url.pathname.slice(0, -1) : url.pathname,
|
url.pathname.endsWith("/") ? url.pathname.slice(0, -1) : url.pathname,
|
||||||
);
|
);
|
||||||
url.pathname = pathParts
|
url.pathname = pathParts
|
||||||
.filter((x) => x !== null && x.toString().length > 0)
|
.filter((x) => x !== null && x.toString().length > 0).join("/");
|
||||||
.join("/");
|
|
||||||
}
|
}
|
||||||
return url.toString();
|
return url.toString();
|
||||||
}
|
}
|
||||||
const baseParts = baseOrParts.concat(pathParts ?? []);
|
const baseParts = baseOrParts.concat(pathParts ?? []);
|
||||||
return baseParts
|
return baseParts
|
||||||
.filter((x) => x !== null && x.toString().length > 0)
|
.filter((x) => x !== null && x.toString().length > 0).join("/");
|
||||||
.join("/");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|
Loading…
Reference in a new issue