Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/asyncapi/asyncapi-react i…
Browse files Browse the repository at this point in the history
…nto if-else-correction
  • Loading branch information
parasss19 committed Oct 12, 2023
2 parents 6fdab20 + c54659d commit d74d705
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 70 deletions.
18 changes: 9 additions & 9 deletions library/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/react-component",
"version": "1.0.1",
"version": "1.0.2",
"private": false,
"description": "A React component for AsyncAPI specification.",
"repository": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"@asyncapi/avro-schema-parser": "3.0.3",
"@asyncapi/openapi-schema-parser": "3.0.4",
"@asyncapi/protobuf-schema-parser": "3.0.0",
"@asyncapi/parser": "^3.0.0-next-major-spec.1",
"@asyncapi/parser": "^3.0.0-next-major-spec.3",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^0.13.0",
"marked": "^4.0.14",
Expand Down
1 change: 0 additions & 1 deletion library/src/containers/AsyncApi/Standalone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class AsyncApiComponent extends Component<AsyncApiProps, AsyncAPIState> {
if (parsedSpec) {
this.state = { asyncapi: parsedSpec };
}
return;
}

async componentDidMount() {
Expand Down
5 changes: 2 additions & 3 deletions library/src/containers/Servers/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export const Security: React.FunctionComponent<Props> = ({

let renderedSecurities;
if (
!security ||
!security.length ||
!security?.length ||
!securitySchemes ||
!Object.keys(securitySchemes).length
) {
Expand Down Expand Up @@ -276,7 +275,7 @@ const SecurityItem: React.FunctionComponent<SecurityItemProps> = ({
</div>
)}

{securitySchema && securitySchema.hasDescription() && (
{securitySchema?.hasDescription() && (
<div>
<Markdown>{securitySchema.description()}</Markdown>
</div>
Expand Down
8 changes: 3 additions & 5 deletions library/src/helpers/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ export class MessageHelpers {
}

const payload = msg.payload();
if (payload && payload.examples()) {
if (payload?.examples()) {
return payload.examples()?.map(example => ({ example }));
}

return;
}

Expand Down Expand Up @@ -84,10 +83,9 @@ export class MessageHelpers {
}

const headers = msg.headers();
if (headers && headers.examples()) {
if (headers?.examples()) {
return headers.examples()?.map(example => ({ example }));
}

return;
return undefined;
}
}
46 changes: 23 additions & 23 deletions playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Playground app for AsyncApi React Component",
"homepage": "https://asyncapi.github.io/asyncapi-react",
"dependencies": {
"@asyncapi/react-component": "^1.0.1",
"@asyncapi/react-component": "^1.0.2",
"@fortawesome/fontawesome-svg-core": "^1.2.22",
"@fortawesome/free-brands-svg-icons": "^5.10.2",
"@fortawesome/free-solid-svg-icons": "^5.10.2",
Expand Down Expand Up @@ -45,5 +45,5 @@
"last 1 safari version"
]
},
"version": "1.0.1"
"version": "1.0.2"
}
46 changes: 23 additions & 23 deletions web-component/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions web-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/web-component",
"version": "1.0.1",
"version": "1.0.2",
"private": false,
"description": "A web component for AsyncAPI specification. Based on @asyncapi/react-component.",
"repository": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"install:reactcomp": "chmod +x ./bump-react-comp.sh && ./bump-react-comp.sh"
},
"dependencies": {
"@asyncapi/react-component": "^1.0.1",
"@asyncapi/react-component": "^1.0.2",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"web-react-components": "^1.4.2"
Expand Down

0 comments on commit d74d705

Please sign in to comment.