From 47ca9300dc098b38ad2926efd0bcc053345fff83 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 21 Jan 2022 18:33:11 +0530 Subject: [PATCH] handle null url --- src/utils/collection/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/collection/index.ts b/src/utils/collection/index.ts index 3ddb0d108..9cdbc4db0 100644 --- a/src/utils/collection/index.ts +++ b/src/utils/collection/index.ts @@ -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;