Skip to content

Commit 914778b

Browse files
authoredAug 1, 2023
Merge pull request #1757 from Fewwy/reportdetails-kek
fix(advisor-3041): fixing external link crash
2 parents 60e56b8 + 20e4191 commit 914778b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/advisor-components/src/ReportDetails/ReportDetails.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const ReportDetails: React.FC<ReportDetailsProps> = ({
100100
<React.Fragment>
101101
<ExternalLink
102102
href={`${linkEditor(kbaDetail?.view_uri)}`}
103-
content={kbaDetail.publishedTitle ? kbaDetail.publishedTitle : `Knowledgebase article`}
103+
content={kbaDetail?.publishedTitle ? kbaDetail?.publishedTitle : `Knowledgebase article`}
104104
/>
105105
.
106106
</React.Fragment>

‎packages/advisor-components/src/common.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const topicLinks = (rule: RuleContentRhel, topics: TopicRhel[], Link: any
2525
)
2626
: [];
2727

28-
export const ExternalLink = ({ href, content }: { href: string; content: string }) => (
28+
export const ExternalLink = ({ href = '', content = '' }: { href: string; content: string }) => (
2929
<a rel="noopener noreferrer" target="_blank" href={href}>
3030
{content} <i className="fas fa-external-link-alt" />
3131
</a>

0 commit comments

Comments
 (0)
Please sign in to comment.