diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 20e8869e7..bb6542c69 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -1474,8 +1474,10 @@ const Textarea = forwardRef((props, ref) => { if (!textarea) return; const resizeObserver = new ResizeObserver(() => { // Get height of textarea, set height to textExpander - const { height } = textarea.getBoundingClientRect(); - textExpanderRef.current.style.height = height + 'px'; + if (textExpanderRef.current) { + const { height } = textarea.getBoundingClientRect(); + textExpanderRef.current.style.height = height + 'px'; + } }); resizeObserver.observe(textarea); }, []);