mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
fix warnings on copy fragment, closes #434
This commit is contained in:
@@ -573,12 +573,12 @@ const Node = {
|
|||||||
node = node.splitBlockAtRange(end, Infinity)
|
node = node.splitBlockAtRange(end, Infinity)
|
||||||
|
|
||||||
// Get the start and end nodes.
|
// Get the start and end nodes.
|
||||||
const startNode = node.getNextSibling(node.getHighestChild(startKey))
|
const startNode = node.getNextSibling(node.getHighestChild(startKey).key)
|
||||||
const endNode = startKey == endKey
|
const endNode = startKey == endKey
|
||||||
? node.getHighestChild(next)
|
? node.getHighestChild(next.key)
|
||||||
: node.getHighestChild(endKey)
|
: node.getHighestChild(endKey)
|
||||||
|
|
||||||
nodes = node.getChildrenBetweenIncluding(startNode, endNode)
|
nodes = node.getChildrenBetweenIncluding(startNode.key, endNode.key)
|
||||||
|
|
||||||
// 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