Skip to content

Commit

Permalink
fix: use casting to rather than if condition in CollectionFactory.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ekraffmiller committed Nov 2, 2024
1 parent f91eb9f commit f035c26
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/sections/create-collection/CreateCollectionFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<CreateCollection
Expand Down

0 comments on commit f035c26

Please sign in to comment.