Skip to content

Commit

Permalink
Fix null style
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeaun committed Nov 19, 2023
1 parent eb203a0 commit 1383296
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/compose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}, []);
Expand Down

0 comments on commit 1383296

Please sign in to comment.