Fix code so it can be parsed by mmjstool (#2816)

This commit is contained in:
Elias Nahum 2019-05-22 09:31:30 -04:00 committed by GitHub
parent d498f15040
commit 90d9b7acca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -411,7 +411,8 @@ export function handleSelectChannelByName(channelName, teamName) {
return async (dispatch, getState) => {
const state = getState();
const {teams: currentTeams, currentTeamId} = state.entities.teams;
const currentTeamName = currentTeams[currentTeamId]?.name;
const currentTeam = currentTeams[currentTeamId];
const currentTeamName = currentTeam?.name;
const {data: channel} = await dispatch(getChannelByNameAndTeamName(teamName || currentTeamName, channelName));
const currentChannelId = getCurrentChannelId(state);
if (channel && currentChannelId !== channel.id) {