MOBILE-3213 resource: Fix resource icon set

main
Pau Ferrer Ocaña 2019-12-11 15:46:05 +01:00
parent 36a070d98f
commit 07b32226bd
1 changed files with 4 additions and 5 deletions

View File

@ -222,12 +222,11 @@ export class AddonModResourceModuleHandler implements CoreCourseModuleHandler {
} }
} }
if (resourceData.icon == '') {
resourceData.icon = this.courseProvider.getModuleIconSrc(this.modName, module.modicon);
}
resourceData.extra += extra.join(' '); resourceData.extra += extra.join(' ');
} else { }
// No files, just set the icon.
// No previously set, just set the icon.
if (resourceData.icon == '') {
resourceData.icon = this.courseProvider.getModuleIconSrc(this.modName, module.modicon); resourceData.icon = this.courseProvider.getModuleIconSrc(this.modName, module.modicon);
} }