handle null url
This commit is contained in:
parent
c917f8144e
commit
47ca9300dc
|
@ -109,6 +109,9 @@ export async function downloadCollection(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function transformShareURLForHost(url: string, collectionKey: string) {
|
export function transformShareURLForHost(url: string, collectionKey: string) {
|
||||||
|
if (!url) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
const host = window.location.host;
|
const host = window.location.host;
|
||||||
const sharableURL = new URL(url);
|
const sharableURL = new URL(url);
|
||||||
sharableURL.host = host;
|
sharableURL.host = host;
|
||||||
|
|
Loading…
Reference in a new issue