MOBILE-2795 comments: Fix uncaught exception
parent
ab4941b8ac
commit
1bb6a35d8c
|
@ -78,20 +78,16 @@ export class CoreCommentsViewerPage {
|
|||
// Get the user profile image.
|
||||
this.userProvider.getProfile(comment.userid, undefined, true).then((user) => {
|
||||
comment.profileimageurl = user.profileimageurl;
|
||||
}).catch(() => {
|
||||
// Ignore errors.
|
||||
});
|
||||
});
|
||||
}).catch((error) => {
|
||||
if (error) {
|
||||
if (this.component == 'assignsubmission_comments') {
|
||||
if (error && this.component == 'assignsubmission_comments') {
|
||||
this.domUtils.showAlertTranslated('core.notice', 'core.commentsnotworking');
|
||||
} else {
|
||||
this.domUtils.showErrorModal(error);
|
||||
this.domUtils.showErrorModalDefault(error, this.translate.instant('core.error') + ': get_comments');
|
||||
}
|
||||
} else {
|
||||
this.domUtils.showErrorModal(this.translate.instant('core.error') + ': get_comments');
|
||||
}
|
||||
|
||||
return Promise.reject(null);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue