Skip to content

Commit 9fef4a6

Browse files
author
Aranyajit
committed
handle null and undefined for timeline template id
1 parent 4c0b820 commit 9fef4a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common/challenge-helper.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,12 @@ class ChallengeHelper {
530530
}
531531

532532
isProjectIdRequired(timelineTemplateId) {
533-
if (!_.includes(config.SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID, timelineTemplateId)) return true;
533+
if (
534+
_.isNull(timelineTemplateId) ||
535+
_.isUndefined(timelineTemplateId) ||
536+
!_.includes(config.SKIP_PROJECT_ID_BY_TIMLINE_TEMPLATE_ID, timelineTemplateId)
537+
)
538+
return true;
534539
return false;
535540
}
536541
}

0 commit comments

Comments
 (0)