-
-
Notifications
You must be signed in to change notification settings - Fork 98
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: studio breaking when trying to generate code/document #804
Conversation
🦋 Changeset detectedLatest commit: 722e8f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for modest-rosalind-098b67 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for asyncapi-studio-design-system ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -106,7 +106,7 @@ export const TemplateParametersSans: ForwardRefRenderFunction<TemplateParameters | |||
const servers = document?.servers(); | |||
const availableServers: string[] = []; | |||
Object.entries(servers || {}).forEach(([serverName, server]) => { | |||
if (supportedProtocols.includes(server.protocol())) availableServers.push(serverName); | |||
if (server.protocol && supportedProtocols.includes(server.protocol())) availableServers.push(serverName); |
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.
How can it be that protocol
is not a function? What is it instead? 🤔
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.
So, based on what I noticed during the iteration, some index of server in server.protocol
is returning undefined
Also, if you plan to release a new version, please add a changeset: https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md |
Why should it be a new version if I'm just fixing a tiny bug 🤔 |
@AceTheCreator it is a bug fix so it should release a patch version. |
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.
LGTM!
@fmvilas, can you approve this? |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
/rtm |
This PR fixes the following issue. #803
cc @fmvilas @Souvikns