summaryrefslogtreecommitdiffstats
path: root/webapp/routes/route_team.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-29 10:03:57 -0400
committerenahum <nahumhbl@gmail.com>2017-06-29 10:03:57 -0400
commit3cd8057d28b28f360b630bbc323fdf22d144b83b (patch)
tree5a2d20472c42c9e0cb249f5800c4bdd26ecdb79f /webapp/routes/route_team.jsx
parentbef07fc53eb5cf77ee152a24de002b9289503a4a (diff)
downloadchat-3cd8057d28b28f360b630bbc323fdf22d144b83b.tar.gz
chat-3cd8057d28b28f360b630bbc323fdf22d144b83b.tar.bz2
chat-3cd8057d28b28f360b630bbc323fdf22d144b83b.zip
Various updates to match latest mattermost-redux (#6794)
Diffstat (limited to 'webapp/routes/route_team.jsx')
-rw-r--r--webapp/routes/route_team.jsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/webapp/routes/route_team.jsx b/webapp/routes/route_team.jsx
index f8ff3b593..59cf6d673 100644
--- a/webapp/routes/route_team.jsx
+++ b/webapp/routes/route_team.jsx
@@ -51,10 +51,10 @@ function doChannelChange(state, replace, callback) {
if (!channel) {
joinChannel(UserStore.getCurrentId(), TeamStore.getCurrentId(), null, state.params.channel)(dispatch, getState).then(
- (data) => {
- if (data) {
- GlobalActions.emitChannelClickEvent(data.channel);
- } else if (data == null) {
+ (result) => {
+ if (result.data) {
+ GlobalActions.emitChannelClickEvent(result.data.channel);
+ } else if (result.error) {
if (state.params.team) {
replace('/' + state.params.team + '/channels/town-square');
} else {
@@ -192,11 +192,11 @@ function onChannelByIdentifierEnter(state, replace, callback) {
callback();
} else {
joinChannel(UserStore.getCurrentId(), TeamStore.getCurrentId(), null, identifier)(dispatch, getState).then(
- (data) => {
- if (data) {
- GlobalActions.emitChannelClickEvent(data.channel);
+ (result) => {
+ if (result.data) {
+ GlobalActions.emitChannelClickEvent(result.data.channel);
callback();
- } else if (data == null) {
+ } else if (result.error) {
handleError(state, replace, callback);
}
}