Skip to content

Commit

Permalink
fix: studio breaking when trying to generate code/document (#804)
Browse files Browse the repository at this point in the history
Co-authored-by: Khuda Dad Nomani <[email protected]>
  • Loading branch information
AceTheCreator and KhudaDad414 authored Oct 11, 2023
1 parent 2b1da06 commit 9187c17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changeset/lucky-geckos-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@asyncapi/studio": patch
---
fix studio breaking when trying to generate code/document
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

if (supportedProtocols.length && availableServers.length === 0) {
Expand Down

0 comments on commit 9187c17

Please sign in to comment.