Merge pull request #3788 from crazyserver/MOBILE-4407

MOBILE4407 url: Fix url icon without main file
main
Noel De Martin 2023-09-26 14:48:55 +02:00 committed by GitHub
commit 202de46616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -150,11 +150,7 @@ export class AddonModUrlModuleHandlerService extends CoreModuleHandlerBase imple
} }
} }
if (!mainFile) { const icon = mainFile? AddonModUrl.guessIcon(mainFile.fileurl) : undefined;
return;
}
const icon = AddonModUrl.guessIcon(mainFile.fileurl);
// Calculate the icon to use. // Calculate the icon to use.
return CoreCourse.getModuleIconSrc(module.modname, module.modicon, icon); return CoreCourse.getModuleIconSrc(module.modname, module.modicon, icon);