From 3b601620de34c9a1856305804d94744154a60f59 Mon Sep 17 00:00:00 2001 From: RamiBerm <54766858+RamiBerm@users.noreply.github.com> Date: Sun, 6 Feb 2022 16:48:13 +0200 Subject: [PATCH] TRA-4264 fix crash when switching services --- src/webview/src/components/endpointSchema.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webview/src/components/endpointSchema.tsx b/src/webview/src/components/endpointSchema.tsx index b0ccad4..7634d70 100644 --- a/src/webview/src/components/endpointSchema.tsx +++ b/src/webview/src/components/endpointSchema.tsx @@ -42,7 +42,9 @@ const SchemaAccordion: React.FC = ({header, key, hideOnSta }; const EndpointSchema: React.FC = ({schema, isThemeDark}) => { - + if (!schema) { + return <>; + } const requestBody = useMemo(() => JSON.stringify(getRequestBodySchemaForView(schema), null, 4), [schema]);