forked from EVOgeek/Vmeda.Online
		
	Merge pull request #2537 from dpalou/MOBILE-3530
MOBILE-3530 course: Fix error when removing course files with site pl…
This commit is contained in:
		
						commit
						7d48aa1cd7
					
				| @ -730,10 +730,10 @@ export class CoreCourseModulePrefetchDelegate extends CoreDelegate { | ||||
|     getModuleFiles(module: any, courseId: number): Promise<any[]> { | ||||
|         const handler = this.getPrefetchHandlerFor(module); | ||||
| 
 | ||||
|         if (handler.getFiles) { | ||||
|         if (handler && handler.getFiles) { | ||||
|             // The handler defines a function to get files, use it.
 | ||||
|             return Promise.resolve(handler.getFiles(module, courseId)); | ||||
|         } else if (handler.loadContents) { | ||||
|         } else if (handler && handler.loadContents) { | ||||
|             // The handler defines a function to load contents, use it before returning module contents.
 | ||||
|             return handler.loadContents(module, courseId).then(() => { | ||||
|                 return module.contents; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user