Fix error when updating a GM/DM (#25186)

Этот коммит содержится в:
Daniel Espino García
2023-11-06 13:19:58 +01:00
коммит произвёл GitHub
родитель 2f86b1ffd7
Коммит 83e06a65a6

Просмотреть файл

@@ -644,7 +644,8 @@ export function handleChannelUpdatedEvent(msg) {
if (channel.id === getCurrentChannelId(state)) {
// using channel's team_id to ensure we always redirect to current channel even if channel's team changes.
getHistory().replace(`${getRelativeTeamUrl(state, channel.team_id)}/channels/${channel.name}`);
const teamId = channel.team_id || getCurrentTeamId(state);
getHistory().replace(`${getRelativeTeamUrl(state, teamId)}/channels/${channel.name}`);
}
};
}