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:
parent
376eada539
commit
14193c30f0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user