-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Boolean/number props not getting parsed correctly #362
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. I think it's smart to add tests for this as this is core functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice that you added the test!
The last release made block props able to be booleans or numbers, not just strings. While the type definitions for this are all correct, there is an issue when parsing block props. All props are rendered to HTML attributes, so they must be converted to strings. This means when parsing them, we must also figure out whether to parse they should actually be booleans or numbers, which we weren't doing before. E.g. copy/pasting an image would cause the second image's
width
prop to be a string instead of a number.