diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-07-28 08:41:17 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-07-28 08:41:17 -0400 |
commit | a88ff1b64d4238e2a94b885cd0a6feed35a5c9b5 (patch) | |
tree | 27f0034958103e716eca14ad788da190ee18b7f0 | |
parent | fc7ae6ba65185719591d89a1be84fb3f9804943b (diff) | |
download | chat-a88ff1b64d4238e2a94b885cd0a6feed35a5c9b5.tar.gz chat-a88ff1b64d4238e2a94b885cd0a6feed35a5c9b5.tar.bz2 chat-a88ff1b64d4238e2a94b885cd0a6feed35a5c9b5.zip |
Fix console error when receiving a new message in the system console or on another team (#3688)
-rw-r--r-- | webapp/actions/post_actions.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx index ae359d7f2..7d830d11b 100644 --- a/webapp/actions/post_actions.jsx +++ b/webapp/actions/post_actions.jsx @@ -22,8 +22,10 @@ export function handleNewPost(post, msg) { } else { AsyncClient.getChannel(post.channel_id); } - } else if (msg && (TeamStore.getCurrentId() === msg.team_id || msg.props.channel_type === Constants.DM_CHANNEL)) { - AsyncClient.getChannel(post.channel_id); + } else if (msg && (TeamStore.getCurrentId() === msg.team_id || msg.data.channel_type === Constants.DM_CHANNEL)) { + if (Client.teamId) { + AsyncClient.getChannel(post.channel_id); + } } var websocketMessageProps = null; |