diff --git a/app/components/edit_channel_info/index.js b/app/components/edit_channel_info/index.js index 319f926de..38fa8d9d2 100644 --- a/app/components/edit_channel_info/index.js +++ b/app/components/edit_channel_info/index.js @@ -34,7 +34,7 @@ export default class EditChannelInfo extends PureComponent { enableRightButton: PropTypes.func, saving: PropTypes.bool.isRequired, editing: PropTypes.bool, - error: PropTypes.string, + error: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), displayName: PropTypes.string, currentTeamUrl: PropTypes.string, channelURL: PropTypes.string, diff --git a/app/components/post_header/post_header.js b/app/components/post_header/post_header.js index 5e9fa059f..797139f8a 100644 --- a/app/components/post_header/post_header.js +++ b/app/components/post_header/post_header.js @@ -25,7 +25,7 @@ export default class PostHeader extends PureComponent { commentCount: PropTypes.number, commentedOnDisplayName: PropTypes.string, createAt: PropTypes.number.isRequired, - displayName: PropTypes.string.isRequired, + displayName: PropTypes.string, enablePostUsernameOverride: PropTypes.bool, fromWebHook: PropTypes.bool, isPendingOrFailedPost: PropTypes.bool, @@ -39,7 +39,7 @@ export default class PostHeader extends PureComponent { shouldRenderReplyButton: PropTypes.bool, showFullDate: PropTypes.bool, theme: PropTypes.object.isRequired, - username: PropTypes.string.isRequired, + username: PropTypes.string, isFlagged: PropTypes.bool, }; @@ -50,7 +50,9 @@ export default class PostHeader extends PureComponent { }; handleUsernamePress = () => { - this.props.onUsernamePress(this.props.username); + if (this.props.username) { + this.props.onUsernamePress(this.props.username); + } } getDisplayName = (style) => {