We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15eca0a commit 9e1a8e7Copy full SHA for 9e1a8e7
src/shared/components/challenge-detail/Header/index.jsx
@@ -126,7 +126,7 @@ export default function ChallengeHeader(props) {
126
const hasSubmissions = userDetails && (userDetails.submissions || []).reduce((acc, submission) => acc || submission.status !== 'Deleted', false);
127
128
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') {
+ if (hasRegistered && allPhases[0] && allPhases[0].name === 'Registration') {
130
nextPhase = allPhases[1] || {};
131
}
132
const nextDeadline = nextPhase && nextPhase.name;
0 commit comments