Skip to content

[lexical-link]: Refactor: add afterCloneFrom method to LinkNode/AutoLinkNode#8226

Merged
etrepum merged 5 commits intofacebook:mainfrom
levensta:afterclonefrom-link
Mar 16, 2026
Merged

[lexical-link]: Refactor: add afterCloneFrom method to LinkNode/AutoLinkNode#8226
etrepum merged 5 commits intofacebook:mainfrom
levensta:afterclonefrom-link

Conversation

@levensta
Copy link
Copy Markdown
Contributor

@levensta levensta commented Mar 16, 2026

Description

These changes fix some rare bugs that occur when using subclasses extended from LinkNode and relax the typing constraints of the canBeEmpty method

This PR adds the classic afterCloneFrom method to LinkNode to avoid copying issues, and adds an additional check to the transformation function to prevent unnecessary operations when no mutations occur.

Test plan

Before

Insert relevant screenshots/recordings/automated-tests

After

Insert relevant screenshots/recordings/automated-tests

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Mar 16, 2026 2:07am
lexical-playground Ready Ready Preview, Comment Mar 16, 2026 2:07am

Request Review

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
@etrepum etrepum added this pull request to the merge queue Mar 16, 2026
Merged via the queue into facebook:main with commit 3dde937 Mar 16, 2026
37 checks passed
@etrepum etrepum mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants