diff --git a/src/components/ApiLogo/ApiLogo.tsx b/src/components/ApiLogo/ApiLogo.tsx index 315e478a..16d5258c 100644 --- a/src/components/ApiLogo/ApiLogo.tsx +++ b/src/components/ApiLogo/ApiLogo.tsx @@ -11,6 +11,8 @@ export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> { if (!logoInfo || !logoInfo.url) { return null; } + + const logoHref = logoInfo.href || (info.contact && info.contact.url); // Use the english word logo if no alt text is provided const altText = logoInfo.altText ? logoInfo.altText : 'logo'; @@ -25,9 +27,8 @@ export class ApiLogo extends React.Component<{ info: OpenAPIInfo }> { return ( { - logoInfo.href ? LinkWrap(logoInfo.href)(logo) : - info.contact && info.contact.url ? LinkWrap(info.contact.url)(logo) : logo - }{' '} + logoHref ? LinkWrap(logoHref)(logo) : logo + } ); }