From dd8237cc07b6a61d630807315a173bc4054bc98d Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Wed, 12 Oct 2016 23:59:46 -0700 Subject: [PATCH] Fix --- src/renderers/dom/client/ReactInputSelection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderers/dom/client/ReactInputSelection.js b/src/renderers/dom/client/ReactInputSelection.js index 680d3c47f9705..a5502223cfadf 100644 --- a/src/renderers/dom/client/ReactInputSelection.js +++ b/src/renderers/dom/client/ReactInputSelection.js @@ -51,7 +51,7 @@ function getElementsWithSelections(acc, win) { var endNode = selection.focusNode; var startOffset = selection.anchorOffset; var endOffset = selection.focusOffset; - if (startNode.childNodes.length) { + if (startNode && startNode.childNodes.length) { if (startNode.childNodes[startOffset] === endNode.childNodes[endOffset]) { element = startNode.childNodes[startOffset]; }