From 0a5bfd2adce93498f2de5fcd6275c17bdf4f015a Mon Sep 17 00:00:00 2001 From: joehua87 Date: Sun, 12 Nov 2017 06:50:53 +0700 Subject: [PATCH] Update find-point.js (#1373) --- packages/slate-react/src/utils/find-point.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/slate-react/src/utils/find-point.js b/packages/slate-react/src/utils/find-point.js index b90b2c9f8..2711e100e 100644 --- a/packages/slate-react/src/utils/find-point.js +++ b/packages/slate-react/src/utils/find-point.js @@ -52,6 +52,7 @@ function findPoint(nativeNode, nativeOffset, value) { const voidNode = parentNode.closest(VOID_SELECTOR) if (!voidNode) return null rangeNode = voidNode.querySelector(RANGE_SELECTOR) + if (!rangeNode) return null node = rangeNode offset = node.textContent.length }