From 867d7c9e8d444cd2d2077f4bada9972cceb63e63 Mon Sep 17 00:00:00 2001 From: Ulion Date: Tue, 29 Dec 2020 17:55:29 +0800 Subject: [PATCH] Fix split_node missing properties bug. --- packages/bridge/src/apply/node/splitNode.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bridge/src/apply/node/splitNode.ts b/packages/bridge/src/apply/node/splitNode.ts index a3227de..776ecf9 100644 --- a/packages/bridge/src/apply/node/splitNode.ts +++ b/packages/bridge/src/apply/node/splitNode.ts @@ -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 &&