diff --git a/src/components/left/main/ChatList.tsx b/src/components/left/main/ChatList.tsx index 23563a4a0..0e2edc73f 100644 --- a/src/components/left/main/ChatList.tsx +++ b/src/components/left/main/ChatList.tsx @@ -106,7 +106,7 @@ const ChatList: FC = ({ if (!digit) return; const position = Number(digit) - 1; - if (position > orderedIds!.length - 1) return; + if (position > orderedIds!.length - 1 || position < 0) return; openChat({ id: orderedIds![position], shouldReplaceHistory: true }); }