Skip to content

Commit

Permalink
fix TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jul 22, 2020
1 parent fd62548 commit 5da19aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/docusaurus/src/client/exports/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Link({isNavLink, activeClassName, ...props}: Props): JSX.Element {
const isAnchorLink = targetLink?.startsWith('#') ?? false;
const isRegularHtmlLink = !targetLink || !isInternal || isAnchorLink;

if (isInternal && !isAnchorLink) {
if (targetLink && isInternal && !isAnchorLink) {
if (targetLink && targetLink.startsWith('/http')) {
console.log('collectLink', props);
}
Expand All @@ -99,7 +99,6 @@ function Link({isNavLink, activeClassName, ...props}: Props): JSX.Element {
return isRegularHtmlLink ? (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
// @ts-expect-error: href specified twice needed to pass children and other user specified props
href={targetLink}
{...(!isInternal && {target: '_blank', rel: 'noopener noreferrer'})}
{...props}
Expand Down

0 comments on commit 5da19aa

Please sign in to comment.