Fix split_node missing properties bug. (#45)

master
Ulion 3 years ago committed by GitHub
parent 322b083f68
commit 1a536f2fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save