-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 format expression options validation #8339
Conversation
4bcd229
to
c19aa19
Compare
Potentially we'd also like to pick up the missing web documentation for |
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.
This is looking good. Could use a couple additional test cases for a format expression with a text-font
override, and with invalid values or invalid overrides
This branch fixes
format
expression options validation. Previously any value literals used within fields of the options object would fail to validate, causing the style to fail to run. This solution chooses to recursivelyunbundle
fields of options objects. Unbundling is an operation that coercesnew Object(...)
constructed primitives (String, Boolean, Number) into bare primitives. This makes little difference except to all our internal runtime type reflection during validation.Closes #8271
Launch Checklist
@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes@mapbox/gl-native
if this PR includes shader changes or needs a native port