summaryrefslogtreecommitdiffstats
path: root/webapp/root.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-04 12:24:12 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-04-04 12:24:12 -0400
commit2bdab516b293d97f9797039e84f9d04656d2134d (patch)
treecf53b8f94f4f3d7ec1d697457c9847009035c058 /webapp/root.jsx
parent2bb9332467f54ed6e2bc39e088c1268a61b24b6e (diff)
parent5f3111e8809ccc4fe32cc2958da5a47fd9c09bef (diff)
downloadchat-2bdab516b293d97f9797039e84f9d04656d2134d.tar.gz
chat-2bdab516b293d97f9797039e84f9d04656d2134d.tar.bz2
chat-2bdab516b293d97f9797039e84f9d04656d2134d.zip
Merge pull request #2625 from mattermost/plt-2502
PLT-2502 Fxing some channel changing issues
Diffstat (limited to 'webapp/root.jsx')
-rw-r--r--webapp/root.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx
index 417a13659..c88b0a7b3 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -180,6 +180,12 @@ function doChannelChange(state) {
channel = JSON.parse(state.location.query.fakechannel);
} else {
channel = ChannelStore.getByName(state.params.channel);
+ if (!channel) {
+ channel = ChannelStore.getMoreByName(state.params.channel);
+ }
+ if (!channel) {
+ console.error('Unable to get channel to change to.'); //eslint-disable-line no-console
+ }
}
GlobalActions.emitChannelClickEvent(channel);
}