We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 403e4d6 commit 6b03fb4Copy full SHA for 6b03fb4
1 file changed
src/renderers/dom/client/ReactInputSelection.js
@@ -51,7 +51,7 @@ function getElementsWithSelections(acc, win) {
51
var endNode = selection.focusNode;
52
var startOffset = selection.anchorOffset;
53
var endOffset = selection.focusOffset;
54
- if (startNode.childNodes.length) {
+ if (startNode && startNode.childNodes.length) {
55
if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) {
56
element = startNode.childNodes[startOffset];
57
}
0 commit comments