Skip to content

Commit 4d13847

Browse files
authored
fix: handle exceptional case when channel is missing on mobile layout (#929)
from #901 (comment)
1 parent 0f8fc3a commit 4d13847

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/App/MobileLayout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ export const MobileLayout: React.FC<MobileLayoutProps> = (
108108
onProfileEditSuccess={onProfileEditSuccess}
109109
onChannelSelect={(channel) => {
110110
setCurrentChannel(channel);
111-
setPanel(PANELS.CHANNEL);
111+
if (channel) {
112+
setPanel(PANELS.CHANNEL);
113+
} else {
114+
setPanel(PANELS.CHANNEL_LIST);
115+
}
112116
}}
113117
allowProfileEdit={allowProfileEdit}
114118
// this condition must be true for mobile

0 commit comments

Comments
 (0)