Commit d7630339 authored by Joram Wilander's avatar Joram Wilander Committed by Derrick Anderson

Fix blank channel header when leaving team (#958)

parent 50d1adf9
......@@ -3,6 +3,7 @@
import {
createDirectChannel,
getChannelByNameAndTeamName,
getChannelAndMyMember,
getChannelStats,
getMyChannelMember,
......@@ -510,6 +511,11 @@ export async function redirectUserToDefaultTeam() {
dispatch(selectChannel(channelId));
channelName = data.channel.name;
}
} else {
const {data} = await dispatch(getChannelByNameAndTeamName(team.name, channelName));
if (data) {
dispatch(selectChannel(data.id));
}
}
redirect(team.name, channelName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment