Closed ebads67 closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
lexical | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 8, 2024 11:41am |
lexical-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 8, 2024 11:41am |
Path | Size |
---|---|
lexical - cjs | 29.94 KB (0%) |
lexical - esm | 29.75 KB (0%) |
@lexical/rich-text - cjs | 38.56 KB (0%) |
@lexical/rich-text - esm | 31.64 KB (0%) |
@lexical/plain-text - cjs | 37.18 KB (0%) |
@lexical/plain-text - esm | 28.95 KB (0%) |
@lexical/react - cjs | 40.35 KB (0%) |
@lexical/react - esm | 33.07 KB (0%) |
Description
In this PR creation of a new
__ids
array is avoided in the clone function of the MarkNode, and the cloned MarkNode will have the same reference to__ids
array of the original node. This has made an issue in thesyncPropertiesFromYjs
function where we compare the old and new nodes' properties, and only make an update to ydoc if the properties are changed. In the case MarkNodes, because the clone function deep-copies the__ids
array the property comparison detects a change, despite the arrays being identical.The fix is keeping the same
__ids
array in the cloned node, and only creating new__ids
array when the array is modified.