@portabletext/editor 6.6.5 → 6.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -7
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -18410,17 +18410,14 @@ function updateBlock({
|
|
|
18410
18410
|
if (isChildChanged)
|
|
18411
18411
|
if (currentBlockChild._key === oldBlockChild?._key && currentBlockChild._type === oldBlockChild?._type) {
|
|
18412
18412
|
debug$1.syncValue("Updating changed child", currentBlockChild, oldBlockChild);
|
|
18413
|
-
const {
|
|
18414
|
-
text: _text,
|
|
18415
|
-
...childProps
|
|
18416
|
-
} = currentBlockChild;
|
|
18417
|
-
applySetNode(slateEditor, childProps, path2);
|
|
18418
18413
|
const isSpanNode2 = isSpan({
|
|
18419
18414
|
schema: context.schema
|
|
18420
18415
|
}, currentBlockChild) && isSpan({
|
|
18421
18416
|
schema: context.schema
|
|
18422
|
-
}, oldBlockChild)
|
|
18423
|
-
|
|
18417
|
+
}, oldBlockChild), childProps = {
|
|
18418
|
+
...currentBlockChild
|
|
18419
|
+
};
|
|
18420
|
+
isSpanNode2 && delete childProps.text, applySetNode(slateEditor, childProps, path2), isSpanNode2 && isTextChanged ? (oldBlockChild.text.length > 0 && deleteText(slateEditor, {
|
|
18424
18421
|
at: {
|
|
18425
18422
|
focus: {
|
|
18426
18423
|
path: path2,
|