MOBILE-3833 competencies: Fix non required param
parent
1fbb4c3880
commit
a549acadcb
|
@ -36,7 +36,7 @@ export class AddonCompetencyCourseCompetenciesPage implements OnInit {
|
||||||
user?: CoreUserProfile;
|
user?: CoreUserProfile;
|
||||||
courseId!: number;
|
courseId!: number;
|
||||||
|
|
||||||
protected userId!: number;
|
protected userId?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View loaded.
|
* View loaded.
|
||||||
|
@ -44,7 +44,7 @@ export class AddonCompetencyCourseCompetenciesPage implements OnInit {
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
try {
|
try {
|
||||||
this.courseId = CoreNavigator.getRequiredRouteNumberParam('courseId');
|
this.courseId = CoreNavigator.getRequiredRouteNumberParam('courseId');
|
||||||
this.userId = CoreNavigator.getRequiredRouteNumberParam('userId');
|
this.userId = CoreNavigator.getRouteNumberParam('userId');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
CoreDomUtils.showErrorModal(error);
|
CoreDomUtils.showErrorModal(error);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue