From f035c26400f104ea84c2136d3199239c3202b38e Mon Sep 17 00:00:00 2001 From: Ellen Kraffmiller Date: Sat, 2 Nov 2024 07:11:55 -0400 Subject: [PATCH] fix: use casting to rather than if condition in CollectionFactory.tsx --- src/sections/create-collection/CreateCollectionFactory.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sections/create-collection/CreateCollectionFactory.tsx b/src/sections/create-collection/CreateCollectionFactory.tsx index bce567238..af55ee266 100644 --- a/src/sections/create-collection/CreateCollectionFactory.tsx +++ b/src/sections/create-collection/CreateCollectionFactory.tsx @@ -14,9 +14,8 @@ export class CreateCollectionFactory { } function CreateCollectionWithParams() { - const { ownerCollectionId } = useParams<{ ownerCollectionId: string }>() - if (!ownerCollectionId) { - throw new Error('ownerCollectionId is required') + const { ownerCollectionId } = useParams<{ ownerCollectionId: string }>() as { + ownerCollectionId: string } return (