-
-
Notifications
You must be signed in to change notification settings - Fork 130
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: render empty extensions and bindings #502
fix: render empty extensions and bindings #502
Conversation
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.
Ok with this solution, but wdyt about “failing early” in the .map
entries?
Something like:
const renderedBindings = Object.entries(bindings).map(
([bindingName, binding]) => {
if (!binding) {
return null;
}
...
@paulRbr It can be done, but in 99.99% of cases there should be no null/undefined, so I gave this comparison at the end using the |
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.
we need to start generating studio previews on PRs 😅
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
🎉 This PR is included in version 1.0.0-next.27 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Changes proposed in this pull request:
Render empty extensions and bindings:
jsonFieldToSchema
function to handlenull
andundefined
values.Bindings
andExtensions
componentRelated issue(s)
Resolves asyncapi/studio#221