Skip to content

Commit

Permalink
fix: cast collectionId from useParams to string
Browse files Browse the repository at this point in the history
  • Loading branch information
ekraffmiller committed Nov 4, 2024
1 parent cd025bb commit c15d083
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/sections/create-dataset/CreateDatasetFactory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ export class CreateDatasetFactory {
}

function CreateDatasetWithSearchParams() {
const { collectionId } = useParams<{ collectionId: string }>()
if (!collectionId) {
throw new Error('collectionId is required')
}
const { collectionId } = useParams<{ collectionId: string }>() as { collectionId: string }

return (
<CreateDataset
datasetRepository={datasetRepository}
Expand Down

0 comments on commit c15d083

Please sign in to comment.