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