Skip to content

Commit 6e7dc2f

Browse files
Merge pull request #3 from WASD-Team/bugfix/OG-4868/react-18-1
[OG-4868] fixed: unmount error react 18
2 parents d16f4df + 214dfcb commit 6e7dc2f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dist/index.es.js

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

13919+
if (!elem) {
13920+
return null;
13921+
}
13922+
1391913923
if (elem.scrollHeight >= LINE_HEIGHT) {
1392013924
if (MAX_HEIGHT < elem.scrollHeight) {
1392113925
elem.style.height = "auto";

0 commit comments

Comments
 (0)