Repository navigation
MessageInput innerHtml error #173
Replies: 1 comment
|
Yes, the guard misses A defensive replacement in that method is: const node = msgRef.current;
if (node === null || node === undefined) {
return true;
}
if (nextProps.value !== node.innerHTML) {
return true;
}Keep the remaining prop comparisons below it. There is another unguarded read in React documents that DOM refs become null when the node is removed. These guards address the null dereference, but do not establish why it happens in your app. If it persists, please share your React/library versions and a minimal example showing how |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I am facing an error that it'll crash the app entirely. When I traced the error, it shows into this part:
Based on the error, I think the above line should be checking for null not undefined right. Someone please help, thanks a lot!!
All reactions