Skip to content

Commit 7306bbf

Browse files
authored
Merge pull request #557 from topcoder-platform/TCA-3.0-hot-fixes
Fix properties of undefined (reading 'track')`
2 parents 463d02d + 93ca68d commit 7306bbf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src-ts/tools/learn/welcome/courses-card/CoursesCard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const CoursesCard: FC<CoursesCardProps> = (props: CoursesCardProps) => {
6666
return (
6767
<div className={classNames(styles.wrap, !courseEnabled && 'soon', isCompleted && styles.completed)}>
6868
<div className={styles.cardHeader}>
69-
<CourseBadge type={props.certification.certificationCategory.track ?? 'DEV'} />
69+
<CourseBadge type={props.certification.certificationCategory?.track ?? 'DEV'} />
7070
<div className={styles.cardHeaderTitleWrap}>
7171
<p className='body-medium-medium'>{clearFCCCertificationTitle(props.certification.title)}</p>
7272
<div className={styles.subTitleWrap}>
@@ -91,7 +91,7 @@ const CoursesCard: FC<CoursesCardProps> = (props: CoursesCardProps) => {
9191
{(isInProgress || isCompleted) && (
9292
<ProgressBar
9393
progress={(isCompleted ? 100 : (props.progress?.courseProgressPercentage ?? 0)) / 100}
94-
track={props.certification.certificationCategory.track}
94+
track={props.certification.certificationCategory?.track}
9595
/>
9696
)}
9797
{!isInProgress && !isCompleted && <div className={styles.cardHeaderDivider} />}

0 commit comments

Comments
 (0)