summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-28 08:41:17 -0400
committerChristopher Speller <crspeller@gmail.com>2016-07-28 08:41:17 -0400
commita88ff1b64d4238e2a94b885cd0a6feed35a5c9b5 (patch)
tree27f0034958103e716eca14ad788da190ee18b7f0 /webapp
parentfc7ae6ba65185719591d89a1be84fb3f9804943b (diff)
downloadchat-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)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/actions/post_actions.jsx6
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;