1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-03-06 05:49:47 +01:00

Fix getFragmentAtRange to not return early when selection is in void node or collapsed (#673)

This commit is contained in:
Anuj 2017-03-21 17:27:50 -07:00 committed by Ian Storm Taylor
parent 376eada539
commit 14193c30f0

View File

@ -500,9 +500,6 @@ const Node = {
let node = this
let nodes = new List()
// If the range is collapsed, there's nothing to do.
if (range.isCollapsed) return Document.create({ nodes })
// Make sure the children exist.
const { startKey, startOffset, endKey, endOffset } = range
node.assertDescendant(startKey)