From 0886b3a53303eabd4b9bfdd8271429557b6d6a9f Mon Sep 17 00:00:00 2001 From: andrey-canon Date: Thu, 28 Dec 2023 10:55:50 -0500 Subject: [PATCH] fix: this checks that the course has an end date before rendering certificate message --- .../progress-tab/certificate-status/CertificateStatus.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx b/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx index a4ac7da7b2..f58e433290 100644 --- a/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx +++ b/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx @@ -185,7 +185,7 @@ const CertificateStatus = () => { default: // if user completes a course before certificates are available, treat it as notAvailable // regardless of passing or nonpassing status - if (!canViewCertificate) { + if (!canViewCertificate && end) { certCase = 'notAvailable'; endDate = intl.formatDate(end, { year: 'numeric',