Remove check of whether prefix is set

pull/915/head
fflorent 1 month ago
parent 9546a1e4ba
commit 968d14d702

@ -1171,11 +1171,7 @@ export type PublicDocWorkerUrlInfo = {
docWorkerUrl: string|null;
}
export function getUrlFromPrefix(homeUrl: string, prefix: string|null) {
if (!prefix) {
// This should never happen.
throw new Error('missing selfPrefix for docWorkerUrl');
}
export function getUrlFromPrefix(homeUrl: string, prefix: string) {
const url = new URL(homeUrl);
url.pathname = prefix + url.pathname;
return url.href;

Loading…
Cancel
Save