MOBILE-2512 workshop: Avoid error when downloading profiles in workshop
parent
204a1ce8f1
commit
424f5e324f
|
@ -363,7 +363,9 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
|
|||
});
|
||||
}).then(() => {
|
||||
// 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 = [];
|
||||
|
||||
userIds.forEach((userId) => {
|
||||
if (userId === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
userId = Number(userId); // Make sure it's a number.
|
||||
|
||||
// Prevent repeats and errors.
|
||||
|
|
Loading…
Reference in New Issue