MOBILE-2675 url: Ignore error when fetching moddule in offline

main
Albert Gasset 2018-10-29 16:03:31 +01:00
parent 5b403129cd
commit 2528df5261
1 changed files with 3 additions and 0 deletions

View File

@ -140,6 +140,9 @@ export class AddonModUrlModuleHandler implements CoreCourseModuleHandler {
return this.courseProvider.loadModuleContents(module, courseId, undefined, false, false, undefined, this.modName)
.then(() => {
return !(module.contents && module.contents[0] && module.contents[0].fileurl);
}).catch(() => {
// Module contents could not be loaded, most probably device is offline.
return true;
});
}