Skip to content

[lexical] Bug Fix: LexicalNode.getType() fallback to $config protocol#7671

Merged
zurfyx merged 1 commit intofacebook:mainfrom
etrepum:hasNode-config-protocol
Jul 3, 2025
Merged

[lexical] Bug Fix: LexicalNode.getType() fallback to $config protocol#7671
zurfyx merged 1 commit intofacebook:mainfrom
etrepum:hasNode-config-protocol

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Jul 3, 2025

Description

Follow-up to #7258

The $config protocol initially assumed that no code was calling Node.getType() before the Node was used in an editor, but there is a use case with plug-ins. This changes the stub implementation of LexicalNode.getType() to support the $config protocol directly.

Test plan

Before

Calling Node.getType() on a node using the $config protocol will throw if it has not first been registered with an editor

After

Calling Node.getType() is safe at all times

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 3, 2025

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 Jul 3, 2025 8:46pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2025 8:46pm

@facebook-github-bot facebook-github-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 Jul 3, 2025
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Jul 3, 2025
@zurfyx zurfyx added this pull request to the merge queue Jul 3, 2025
Merged via the queue into facebook:main with commit b282ceb Jul 3, 2025
43 checks passed
@etrepum etrepum mentioned this pull request Jul 3, 2025
@etrepum etrepum deleted the hasNode-config-protocol branch September 29, 2025 15:34
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.

3 participants