MOBILE-2512 workshop: Avoid error when downloading profiles in workshop
This commit is contained in:
		
							parent
							
								
									204a1ce8f1
								
							
						
					
					
						commit
						424f5e324f
					
				@ -363,7 +363,9 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
 | 
				
			|||||||
            });
 | 
					            });
 | 
				
			||||||
        }).then(() => {
 | 
					        }).then(() => {
 | 
				
			||||||
            // Prefetch user profiles.
 | 
					            // Prefetch user profiles.
 | 
				
			||||||
            return this.userProvider.prefetchProfiles(userIds, courseId, siteId);
 | 
					            return this.userProvider.prefetchProfiles(userIds, courseId, siteId).catch(() => {
 | 
				
			||||||
 | 
					                // Ignore errors.
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -383,6 +383,10 @@ export class CoreUserProvider {
 | 
				
			|||||||
            promises = [];
 | 
					            promises = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        userIds.forEach((userId) => {
 | 
					        userIds.forEach((userId) => {
 | 
				
			||||||
 | 
					            if (userId === null) {
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            userId = Number(userId); // Make sure it's a number.
 | 
					            userId = Number(userId); // Make sure it's a number.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // Prevent repeats and errors.
 | 
					            // Prevent repeats and errors.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user