You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a custom mjml component that uses the color validator on an attribute without a default value
Use this component in some MJML rendering code somewhere but don't give the color attribute a value
Render it to HTML in the normal way
Note the error
Expected behavior
There should be some way of allowing font color to be inherited while still allowing font colors to be specified and providing for validation.
MJML environment (please complete the following information):
Appears in latest source. Found while using mjml 4.7.0
The text was updated successfully, but these errors were encountered:
Yup you're right !
At least the fix isn't that hard, a small guard in the getValue function should do the trick here. Same for inherit we can safely add it to the color list and it will fix #1955 too 😄
Describe the bug
Using the "colorType" validator with an optional attribute causes
cannot read property 'match' of undefined
errors. Likely due to https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/types/color.js#L24I don't want the color to have a default value, because there is not support for the 'inherit' color property here: https://github.com/mjmlio/mjml/blob/master/packages/mjml-core/src/types/helpers/colors.js and I don't want them to have any of these matching colors or any hex color etc.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be some way of allowing font color to be inherited while still allowing font colors to be specified and providing for validation.
MJML environment (please complete the following information):
Appears in latest source. Found while using mjml 4.7.0
The text was updated successfully, but these errors were encountered: