File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
components/challenge-listing/Tooltips/ProgressBarTooltip Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,13 @@ function Tip(props) {
101
101
const submissionPhase = allPhases . find ( phase => phase . name === 'Submission' ) || { } ;
102
102
const checkpointPhase = allPhases . find ( phase => phase . name === 'Checkpoint Submission' ) || { } ;
103
103
104
- if ( registrationPhase ) {
104
+ if ( ! _ . isEmpty ( registrationPhase ) ) {
105
105
steps . push ( {
106
106
date : phaseStartDate ( registrationPhase ) ,
107
107
name : 'Start' ,
108
108
} ) ;
109
109
}
110
- if ( checkpointPhase ) {
110
+ if ( ! _ . isEmpty ( checkpointPhase ) ) {
111
111
steps . push ( {
112
112
date : phaseEndDate ( checkpointPhase ) ,
113
113
name : 'Checkpoint' ,
@@ -119,7 +119,7 @@ function Tip(props) {
119
119
date : phaseEndDate ( iterativeReviewPhase ) ,
120
120
name : 'Iterative Review' ,
121
121
} ) ;
122
- } else if ( submissionPhase ) {
122
+ } else if ( ! _ . isEmpty ( submissionPhase ) ) {
123
123
steps . push ( {
124
124
date : phaseEndDate ( submissionPhase ) ,
125
125
name : 'Submission' ,
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import moment from 'moment' ;
6
- import { find , sumBy } from 'lodash' ;
6
+ import { find , sumBy , isEmpty } from 'lodash' ;
7
7
import { phaseStartDate , phaseEndDate } from './helper' ;
8
8
9
9
export const SORTS = {
@@ -59,7 +59,7 @@ export default {
59
59
const registrationPhase = find ( challenge . phases , p => p . name === 'Registration' ) || { } ;
60
60
const submissionPhase = find ( challenge . phases , p => p . name === 'Submission' ) || { } ;
61
61
// registration phase exists
62
- if ( registrationPhase ) {
62
+ if ( ! isEmpty ( registrationPhase ) ) {
63
63
return moment ( phaseStartDate ( registrationPhase ) ) ;
64
64
}
65
65
// registration phase doesnt exist, This is possibly a F2F or TSK. Take submission phase
You can’t perform that action at this time.
0 commit comments