summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/post_info.jsx2
-rw-r--r--webapp/components/rhs_comment.jsx2
-rw-r--r--webapp/components/rhs_root_post.jsx2
3 files changed, 3 insertions, 3 deletions
diff --git a/webapp/components/post_info.jsx b/webapp/components/post_info.jsx
index ed316745f..e4ac39447 100644
--- a/webapp/components/post_info.jsx
+++ b/webapp/components/post_info.jsx
@@ -33,7 +33,7 @@ export default class PostInfo extends React.Component {
var post = this.props.post;
var isOwner = this.props.currentUser.id === post.user_id;
var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
- const isSystemMessage = post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
+ const isSystemMessage = post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
if (post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING || Utils.isPostEphemeral(post)) {
return '';
diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index c4b62efcf..5bd138732 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -85,7 +85,7 @@ export default class RhsComment extends React.Component {
const isOwner = this.props.currentUser.id === post.user_id;
var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
- const isSystemMessage = post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
+ const isSystemMessage = post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
var dropdownContents = [];
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index f82948726..5938d672b 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -41,7 +41,7 @@ export default class RhsRootPost extends React.Component {
const user = this.props.user;
var isOwner = this.props.currentUser.id === post.user_id;
var isAdmin = TeamStore.isTeamAdminForCurrentTeam() || UserStore.isSystemAdminForCurrentUser();
- const isSystemMessage = post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
+ const isSystemMessage = post.type && post.type.startsWith(Constants.SYSTEM_MESSAGE_PREFIX);
var timestamp = UserStore.getProfile(post.user_id).update_at;
var channel = ChannelStore.get(post.channel_id);