handle null url

This commit is contained in:
Abhinav 2022-01-21 18:33:11 +05:30
parent c917f8144e
commit 47ca9300dc

View file

@ -109,6 +109,9 @@ export async function downloadCollection(
}
export function transformShareURLForHost(url: string, collectionKey: string) {
if (!url) {
return null;
}
const host = window.location.host;
const sharableURL = new URL(url);
sharableURL.host = host;