diff --git a/src/addon/mod/url/components/index/index.ts b/src/addon/mod/url/components/index/index.ts index 1bb02097b..b9381aae0 100644 --- a/src/addon/mod/url/components/index/index.ts +++ b/src/addon/mod/url/components/index/index.ts @@ -120,10 +120,8 @@ export class AddonModUrlIndexComponent extends CoreCourseModuleMainResourceCompo } else { mod = this.module; - if (!mod.contents || !mod.contents.length) { - // Try to load module contents, it's needed to get the URL with parameters. - return this.courseProvider.loadModuleContents(mod, this.courseId, undefined, false, false, undefined, 'url'); - } + // Try to load module contents, it's needed to get the URL with parameters. + return this.courseProvider.loadModuleContents(mod, this.courseId, undefined, false, refresh, undefined, 'url'); } }).then(() => { // Always use the URL from the module because it already includes the parameters.