diff --git a/webapp/channels/src/actions/websocket_actions.jsx b/webapp/channels/src/actions/websocket_actions.jsx index 74b47e8b80..5d4cc67c59 100644 --- a/webapp/channels/src/actions/websocket_actions.jsx +++ b/webapp/channels/src/actions/websocket_actions.jsx @@ -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}`); } }; }