mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-10 09:13:59 +02:00
Fix getFragmentAtRange to not return early when selection is in void node or collapsed (#673)
This commit is contained in:
@@ -500,9 +500,6 @@ const Node = {
|
|||||||
let node = this
|
let node = this
|
||||||
let nodes = new List()
|
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.
|
// Make sure the children exist.
|
||||||
const { startKey, startOffset, endKey, endOffset } = range
|
const { startKey, startOffset, endKey, endOffset } = range
|
||||||
node.assertDescendant(startKey)
|
node.assertDescendant(startKey)
|
||||||
|
Reference in New Issue
Block a user