mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 08:38:37 +00:00
fix: handle invalid channels even when sidebar is closed
This commit is contained in:
@@ -59,15 +59,6 @@ export default observer(() => {
|
||||
|
||||
const channel = channel_id ? client.channels.get(channel_id) : undefined;
|
||||
|
||||
// The user selected no channel, let's see if there's a channel available
|
||||
if (!channel && server.channel_ids.length > 0)
|
||||
return (
|
||||
<Redirect
|
||||
to={`/server/${server_id}/channel/${server.channel_ids[0]}`}
|
||||
/>
|
||||
);
|
||||
if (channel_id && !channel) return <Redirect to={`/server/${server_id}`} />;
|
||||
|
||||
// ! FIXME: move this globally
|
||||
// Track which channel the user was last on.
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user