[Dev] Composer: Fix exception

This commit is contained in:
Alexander Zinchuk 2022-02-14 00:53:37 +03:00
parent a29e6c07da
commit 0bcb12d006

View File

@ -132,6 +132,10 @@ const MessageInput: FC<OwnProps & StateProps> = ({
const chatIdRef = useRef(chatId);
chatIdRef.current = chatId;
const focusInput = useCallback(() => {
if (!inputRef.current) {
return;
}
if (isHeavyAnimating()) {
setTimeout(focusInput, FOCUS_DELAY_MS);
return;