Skip to content

Commit f482e18

Browse files
[OG-4868] fixed: useEffect ref error for react 18
1 parent 6219d40 commit f482e18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dist/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13926,6 +13926,10 @@ var MessageInput = React__default.forwardRef(function(props, ref) {
1392613926
var elem = ref.current;
1392713927
var MAX_HEIGHT = window.document.body.offsetHeight * 0.6;
1392813928

13929+
if (!elem) {
13930+
return null;
13931+
}
13932+
1392913933
if (elem.scrollHeight >= LINE_HEIGHT) {
1393013934
if (MAX_HEIGHT < elem.scrollHeight) {
1393113935
elem.style.height = "auto";

0 commit comments

Comments
 (0)