mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 09:59:48 +02:00
Fix normalize calls after moveNodeByKey
This commit is contained in:
@@ -134,7 +134,7 @@ export function moveNodeByKey(transform, key, newKey, newIndex, options = {}) {
|
|||||||
const { document } = state
|
const { document } = state
|
||||||
const path = document.getPath(key)
|
const path = document.getPath(key)
|
||||||
const newPath = document.getPath(newKey)
|
const newPath = document.getPath(newKey)
|
||||||
const parent = document.key == newKey ? null : document.getCommonAncestor(key, newKey)
|
const parent = document.key == newKey ? document : document.getCommonAncestor(key, newKey)
|
||||||
|
|
||||||
transform = transform.moveNodeOperation(path, newPath, newIndex)
|
transform = transform.moveNodeOperation(path, newPath, newIndex)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user