fix: split node cloning with old properties

This commit is contained in:
Eric Maciel 2020-10-28 17:59:04 -04:00
parent 07a8201215
commit 21493ca238

View File

@ -8,7 +8,7 @@ const splitNode = (doc: SyncValue, op: SplitNodeOperation): SyncValue => {
const [parent, index]: [any, number] = getParent(doc, op.path) const [parent, index]: [any, number] = getParent(doc, op.path)
const target = getChildren(parent)[index] const target = getChildren(parent)[index]
const inject = cloneNode(target) const inject = cloneNode({ ...target, ...op.properties })
if (target.text) { if (target.text) {
target.text.length > op.position && target.text.length > op.position &&