@portabletext/editor 4.3.1 → 4.3.2
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 +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -12971,7 +12971,7 @@ function updateBlock({
|
|
|
12971
12971
|
at: [index, childIndex]
|
|
12972
12972
|
}));
|
|
12973
12973
|
}), slateBlock.children.forEach((currentBlockChild, currentBlockChildIndex) => {
|
|
12974
|
-
const oldBlockChild = oldSlateBlock.children.at(currentBlockChildIndex), isChildChanged = oldBlockChild
|
|
12974
|
+
const oldBlockChild = oldSlateBlock.children.at(currentBlockChildIndex), isChildChanged = !oldBlockChild || !isEqualChild(currentBlockChild, oldBlockChild), isTextChanged = oldBlockChild && Text.isText(oldBlockChild) && currentBlockChild.text !== oldBlockChild.text, path = [index, currentBlockChildIndex];
|
|
12975
12975
|
if (isChildChanged)
|
|
12976
12976
|
if (currentBlockChild._key === oldBlockChild?._key) {
|
|
12977
12977
|
debug.syncValue("Updating changed child", currentBlockChild, oldBlockChild), Transforms.setNodes(slateEditor, currentBlockChild, {
|