MOBILE-3722 calendar: Fix create button in day page

main
Dani Palou 2021-05-12 08:55:37 +02:00
parent 5cbff6021d
commit eb889c04e2
1 changed files with 2 additions and 2 deletions

View File

@ -91,7 +91,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy {
currentMoment!: moment.Moment;
filter: AddonCalendarFilter = {
filtered: false,
courseId: -1,
courseId: undefined,
categoryId: undefined,
course: true,
group: true,
@ -235,7 +235,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy {
this.filter[name] = CoreNavigator.getRouteBooleanParam(name) ?? true;
types.push(value);
});
this.filter.courseId = CoreNavigator.getRouteNumberParam('courseId') || -1;
this.filter.courseId = CoreNavigator.getRouteNumberParam('courseId');
this.filter.categoryId = CoreNavigator.getRouteNumberParam('categoryId');
this.filter.filtered = typeof this.filter.courseId != 'undefined' || types.some((name) => !this.filter[name]);