Skip to content

Commit

Permalink
fix codesmells
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Sep 12, 2023
1 parent a7e6242 commit e127a13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/src/containers/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ export const Sidebar: React.FunctionComponent = () => {
.get('x-logo')
?.value();
const components = asyncapi.components();
const messages = components && components.messages().all();
const schemas = components && components.schemas().all();
const messages = components?.messages().all();
const schemas = components?.schemas().all();
const hasOperations = asyncapi.operations().length > 0;

const messagesList = messages && messages.length > 0 && (
const messagesList = messages?.length > 0 && (
<li className="mb-3 mt-9">
<a
className="text-xs uppercase text-gray-700 mt-10 mb-4 font-thin hover:text-gray-900"
Expand All @@ -52,7 +52,7 @@ export const Sidebar: React.FunctionComponent = () => {
</li>
);

const schemasList = schemas && schemas.length > 0 && (
const schemasList = schemas?.length > 0 && (
<li className="mb-3 mt-9">
<a
className="text-xs uppercase text-gray-700 mt-10 mb-4 font-thin hover:text-gray-900"
Expand Down

0 comments on commit e127a13

Please sign in to comment.