mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 22:02:05 +02:00
* remove warning in getFragmentAtRange for node (#652) * fix typo
This commit is contained in:
parent
0f59ef6447
commit
21c6762e15
@ -524,7 +524,10 @@ const Node = {
|
||||
? node.getFurthestAncestor(next.key)
|
||||
: node.getFurthestAncestor(endKey)
|
||||
|
||||
nodes = node.getChildrenBetweenIncluding(startNode.key, endNode.key)
|
||||
// Get children range of nodes from start to end nodes
|
||||
const startIndex = node.nodes.indexOf(startNode)
|
||||
const endIndex = node.nodes.indexOf(endNode)
|
||||
nodes = node.nodes.slice(startIndex, endIndex + 1)
|
||||
|
||||
// Return a new document fragment.
|
||||
return Document.create({ nodes })
|
||||
|
Loading…
x
Reference in New Issue
Block a user