mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Remove check of whether prefix is set
This commit is contained in:
parent
9546a1e4ba
commit
968d14d702
@ -1171,11 +1171,7 @@ export type PublicDocWorkerUrlInfo = {
|
|||||||
docWorkerUrl: string|null;
|
docWorkerUrl: string|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUrlFromPrefix(homeUrl: string, prefix: string|null) {
|
export function getUrlFromPrefix(homeUrl: string, prefix: string) {
|
||||||
if (!prefix) {
|
|
||||||
// This should never happen.
|
|
||||||
throw new Error('missing selfPrefix for docWorkerUrl');
|
|
||||||
}
|
|
||||||
const url = new URL(homeUrl);
|
const url = new URL(homeUrl);
|
||||||
url.pathname = prefix + url.pathname;
|
url.pathname = prefix + url.pathname;
|
||||||
return url.href;
|
return url.href;
|
||||||
|
Loading…
Reference in New Issue
Block a user