From 1b893a416271a8be7a13bc79895d64973022f1f4 Mon Sep 17 00:00:00 2001 From: Zubeen Date: Sun, 8 Oct 2023 02:42:45 +0530 Subject: [PATCH 1/2] refactor: add an operational chain instead of expressions check (#803) --- library/src/containers/Servers/Security.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/src/containers/Servers/Security.tsx b/library/src/containers/Servers/Security.tsx index 2575c286b..b02b3219b 100644 --- a/library/src/containers/Servers/Security.tsx +++ b/library/src/containers/Servers/Security.tsx @@ -26,8 +26,7 @@ export const Security: React.FunctionComponent = ({ let renderedSecurities; if ( - !security || - !security.length || + !security?.length || !securitySchemes || !Object.keys(securitySchemes).length ) { From 828b42ade2c4223ff01bce38c91fa09cc3685166 Mon Sep 17 00:00:00 2001 From: Zubeen Date: Sun, 8 Oct 2023 03:24:19 +0530 Subject: [PATCH 2/2] refactor: remove redudant return statement (#802) Co-authored-by: Lukasz Gornicki --- library/src/containers/AsyncApi/Standalone.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/library/src/containers/AsyncApi/Standalone.tsx b/library/src/containers/AsyncApi/Standalone.tsx index c92027275..4f5d72fb6 100644 --- a/library/src/containers/AsyncApi/Standalone.tsx +++ b/library/src/containers/AsyncApi/Standalone.tsx @@ -32,7 +32,6 @@ class AsyncApiComponent extends Component { if (parsedSpec) { this.state = { asyncapi: parsedSpec }; } - return; } async componentDidMount() {