Files
start-os/frontend/projects/ui/src/app/util/get-project-id.ts
waterplea 0390954a85 feat: enable strictNullChecks
feat: enable `noImplicitAny`

chore: remove sync data access

fix loading package data for affected dependencies

chore: properly get alt marketplace data

update patchdb client to allow for emit on undefined values
2022-06-19 13:46:09 -06:00

12 lines
283 B
TypeScript

import { ActivatedRoute } from '@angular/router'
export function getProjectId({ snapshot }: ActivatedRoute): string {
const projectId = snapshot.paramMap.get('projectId')
if (!projectId) {
throw new Error('projectId is missing from route params')
}
return projectId
}