mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
* remove warning in getFragmentAtRange for node (#652) * fix typo
This commit is contained in:
committed by
Ian Storm Taylor
parent
0f59ef6447
commit
21c6762e15
@@ -524,7 +524,10 @@ const Node = {
|
|||||||
? node.getFurthestAncestor(next.key)
|
? node.getFurthestAncestor(next.key)
|
||||||
: node.getFurthestAncestor(endKey)
|
: 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 a new document fragment.
|
||||||
return Document.create({ nodes })
|
return Document.create({ nodes })
|
||||||
|
Reference in New Issue
Block a user