mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 21:21:21 +02:00
Normalize moved node (#3851)
This commit is contained in:
committed by
GitHub
parent
aafee36834
commit
b7a56276b2
@@ -353,7 +353,11 @@ const getDirtyPaths = (op: Operation): Path[] => {
|
||||
newAncestors.push(p!)
|
||||
}
|
||||
|
||||
return [...oldAncestors, ...newAncestors]
|
||||
const newParent = newAncestors[newAncestors.length - 1]
|
||||
const newIndex = newPath[newPath.length - 1]
|
||||
const resultPath = newParent.concat(newIndex)
|
||||
|
||||
return [...oldAncestors, ...newAncestors, resultPath]
|
||||
}
|
||||
|
||||
case 'remove_node': {
|
||||
|
Reference in New Issue
Block a user