diff --git a/src/components/TinyMCEEditor.jsx b/src/components/TinyMCEEditor.jsx index fc6162246..1464304f4 100644 --- a/src/components/TinyMCEEditor.jsx +++ b/src/components/TinyMCEEditor.jsx @@ -76,7 +76,7 @@ const TinyMCEEditor = (props) => { const filename = blobInfo.filename(); const { location } = await uploadFile(blob, filename, courseId, postId || 'root'); const img = new Image(); - img.onload = function () { + img.onload = () => { if (img.height > 999 || img.width > 999) { setShowImageWarning(true); } }; img.src = location; diff --git a/src/discussions/post-comments/comments/comment/CommentHeader.jsx b/src/discussions/post-comments/comments/comment/CommentHeader.jsx index bee096778..48f1d026d 100644 --- a/src/discussions/post-comments/comments/comment/CommentHeader.jsx +++ b/src/discussions/post-comments/comments/comment/CommentHeader.jsx @@ -16,6 +16,8 @@ const CommentHeader = ({ const colorClass = AvatarOutlineAndLabelColors[comment.authorLabel]; const hasAnyAlert = useAlertBannerVisible(comment); + const profileImage = Boolean(comment.users) && Object.values(comment.users)[0].profile.image; + return (
{post.type === ThreadType.QUESTION && ( @@ -59,6 +61,7 @@ export const PostAvatar = ({ height: avatarSize, width: avatarSize, }} + src={profileImage.hasImage ? profileImage.imageUrlSmall : undefined} alt={post.author} />