Skip to content

Commit

Permalink
MOBILE4407 url: Fix url icon without main file
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Sep 14, 2023
1 parent 23f0d07 commit 5765ad9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/addons/mod/url/services/handlers/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,7 @@ export class AddonModUrlModuleHandlerService extends CoreModuleHandlerBase imple
}
}

if (!mainFile) {
return;
}

const icon = AddonModUrl.guessIcon(mainFile.fileurl);
const icon = mainFile? AddonModUrl.guessIcon(mainFile.fileurl) : undefined;

// Calculate the icon to use.
return CoreCourse.getModuleIconSrc(module.modname, module.modicon, icon);
Expand Down

0 comments on commit 5765ad9

Please sign in to comment.