Message List: Fix exceptions when switching chat (#2147)

This commit is contained in:
Alexander Zinchuk 2022-11-18 16:05:14 +04:00
parent 08ef6130b7
commit 50d5e6caaa

View File

@ -268,9 +268,13 @@ const MessageList: FC<OwnProps & StateProps> = ({
return;
}
const container = containerRef.current;
if (!container) {
return;
}
isScrollingRef.current = true;
const container = containerRef.current!;
if (!memoFocusingIdRef.current) {
updateStickyDates(container, hasTools);