Skip to content

Commit

Permalink
fix: Making sure email setting model opens when emailSettingsModal.op…
Browse files Browse the repository at this point in the history
…en is true
  • Loading branch information
zwidekalanga committed Aug 12, 2024
1 parent 01ceb41 commit ca3f765
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
EXECUTIVE_EDUCATION_COURSE_MODES,
useEnterpriseCustomer,
} from '../../../../app/data';
import { isCourseEnded, isTodayWithinDateThreshold } from '../../../../../utils/common';
import { isCourseEnded, isDefinedAndNotNull, isTodayWithinDateThreshold } from '../../../../../utils/common';

const messages = defineMessages({
statusBadgeLabelInProgress: {
Expand Down Expand Up @@ -342,9 +342,10 @@ const BaseCourseCard = ({
};

const renderEmailSettingsModal = () => {
if (!hasEmailsEnabled) {
if (!isDefinedAndNotNull(hasEmailsEnabled)) {
return null;
}

return (
<EmailSettingsModal
{...emailSettingsModal.options}
Expand Down

0 comments on commit ca3f765

Please sign in to comment.