Skip to content

Commit 9e1a8e7

Browse files
authored
Update index.jsx
1 parent 15eca0a commit 9e1a8e7

File tree

1 file changed

+1
-1
lines changed
  • src/shared/components/challenge-detail/Header

1 file changed

+1
-1
lines changed

src/shared/components/challenge-detail/Header/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default function ChallengeHeader(props) {
126126
const hasSubmissions = userDetails && (userDetails.submissions || []).reduce((acc, submission) => acc || submission.status !== 'Deleted', false);
127127

128128
let nextPhase = allPhases.filter(p => p.name !== 'Registration' && p.isOpen).sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0];
129-
if (hasRegistered && allPhases && allPhases.name === 'Registration') {
129+
if (hasRegistered && allPhases[0] && allPhases[0].name === 'Registration') {
130130
nextPhase = allPhases[1] || {};
131131
}
132132
const nextDeadline = nextPhase && nextPhase.name;

0 commit comments

Comments
 (0)