1
0
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:
Krzysztof Mędrzycki
2021-03-31 23:49:09 +02:00
committed by GitHub
parent aafee36834
commit b7a56276b2

View File

@@ -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': {