Skip to content

Commit

Permalink
fix issue with test run route
Browse files Browse the repository at this point in the history
  • Loading branch information
coolchock committed Jan 23, 2025
1 parent 9d84e81 commit 93b0803
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,8 @@ export class ExamParticipationComponent implements OnInit, OnDestroy, ComponentC
* loads the exam from the server and initializes the view
*/
ngOnInit(): void {
this.route.parent?.parent?.params.subscribe((params) => {
this.courseId = parseInt(params['courseId'], 10);
});
const courseId = this.route.snapshot.paramMap.get('courseId') || this.route.parent?.parent?.snapshot.paramMap.get('courseId');
this.courseId = parseInt(courseId!, 10);
this.route.params.subscribe((params) => {
this.examId = parseInt(params['examId'], 10);
this.testRunId = parseInt(params['testRunId'], 10);
Expand Down

0 comments on commit 93b0803

Please sign in to comment.