From 9187c171c0ecfd9cac35ef958a6e63a1f4a9d24e Mon Sep 17 00:00:00 2001 From: Ace <40604284+AceTheCreator@users.noreply.github.com> Date: Wed, 11 Oct 2023 04:26:54 -0500 Subject: [PATCH] fix: studio breaking when trying to generate code/document (#804) Co-authored-by: Khuda Dad Nomani <32505158+KhudaDad414@users.noreply.github.com> --- .changeset/lucky-geckos-talk.md | 4 ++++ .../src/components/Modals/Generator/TemplateParameters.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-geckos-talk.md diff --git a/.changeset/lucky-geckos-talk.md b/.changeset/lucky-geckos-talk.md new file mode 100644 index 000000000..7820ad69d --- /dev/null +++ b/.changeset/lucky-geckos-talk.md @@ -0,0 +1,4 @@ +--- +"@asyncapi/studio": patch +--- +fix studio breaking when trying to generate code/document diff --git a/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx b/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx index afc4b97ff..862f7e783 100644 --- a/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx +++ b/apps/studio/src/components/Modals/Generator/TemplateParameters.tsx @@ -106,7 +106,7 @@ export const TemplateParametersSans: ForwardRefRenderFunction { - if (supportedProtocols.includes(server.protocol())) availableServers.push(serverName); + if (server.protocol && supportedProtocols.includes(server.protocol())) availableServers.push(serverName); }); if (supportedProtocols.length && availableServers.length === 0) {