mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
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
This commit is contained in:
11
frontend/projects/ui/src/app/util/get-project-id.ts
Normal file
11
frontend/projects/ui/src/app/util/get-project-id.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user