mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Fix split_node missing properties bug. (#45)
This commit is contained in:
parent
322b083f68
commit
1a536f2fa4
@ -8,7 +8,10 @@ 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 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user