Merge pull request #3819 from alfonso-salces/MOBILE-4362

MOBILE-4362 course-link: Fix section link opening
main
Noel De Martin 2023-10-16 12:24:32 +02:00 committed by GitHub
commit 081172003c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -53,9 +53,9 @@ export class CoreCoursesCourseLinkHandlerService extends CoreContentLinksHandler
params: Params, params: Params,
): CoreContentLinksAction[] | Promise<CoreContentLinksAction[]> { ): CoreContentLinksAction[] | Promise<CoreContentLinksAction[]> {
const courseId = parseInt(params.id, 10); const courseId = parseInt(params.id, 10);
const sectionId = params.sectionid ? parseInt(params.sectionid, 10) : null; const sectionId = params.sectionid ? parseInt(params.sectionid, 10) : undefined;
const pageParams: Params = { const pageParams: Params = {
sectionId: sectionId || null, sectionId: sectionId || undefined,
}; };
let sectionNumber = params.section !== undefined ? parseInt(params.section, 10) : NaN; let sectionNumber = params.section !== undefined ? parseInt(params.section, 10) : NaN;