Merge pull request #2760 from dpalou/MOBILE-3722

MOBILE-3722 calendar: Fix create button in day page
main
Pau Ferrer Ocaña 2021-05-12 09:04:26 +02:00 committed by GitHub
commit 866e6e47f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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]);