commit
4f461958fb
|
@ -566,7 +566,7 @@ export class CoreCourseHelperProvider {
|
||||||
siteId = siteId || this.sitesProvider.getCurrentSiteId();
|
siteId = siteId || this.sitesProvider.getCurrentSiteId();
|
||||||
|
|
||||||
let promise;
|
let promise;
|
||||||
if (files) {
|
if (files && files.length) {
|
||||||
promise = Promise.resolve(files);
|
promise = Promise.resolve(files);
|
||||||
} else {
|
} else {
|
||||||
promise = this.courseProvider.loadModuleContents(module, courseId).then(() => {
|
promise = this.courseProvider.loadModuleContents(module, courseId).then(() => {
|
||||||
|
|
Loading…
Reference in New Issue