Skip to content

fix: freeze get style object in DEV env to avoid mutations - #4616

Merged
fantactuka merged 1 commit into
meta:mainfrom
JatinRanka:fix/style-mutate
Jun 7, 2023
Merged

fantactuka merged 1 commit into
meta:mainfrom
JatinRanka:fix/style-mutate

Conversation

@JatinRanka

Copy link
Copy Markdown
Contributor

closes #3946

Currently, the getStyleObjectFromCSS returns the object which is directly mutable. So, added logic to freeze the object before returning to avoid accidental mutations in DEV.

@vercel

vercel Bot commented Jun 7, 2023 •

Copy link
Copy Markdown

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 Jun 7, 2023 2:17pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2023 2:17pm

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Hi @JatinRanka!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@fantactuka

Copy link
Copy Markdown
Contributor

Looks good!
Please accept CLA so that we can merge

@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 Jun 7, 2023
@fantactuka
fantactuka merged commit 679ad3b into meta:main Jun 7, 2023
@JatinRanka
JatinRanka deleted the fix/style-mutate branch June 8, 2023 04:19
@zurfyx zurfyx mentioned this pull request Jul 11, 2023

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 41451998 Deployed Jun 7, 2023 by vercel[bot]
Preview – lexical — 41451998 Deployed Jun 7, 2023 by vercel[bot]
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: getStyleObjectFromCSS should return a read-only object

3 participants