File tree 3 files changed +5
-3
lines changed
components/challenge-detail
containers/challenge-detail
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export default function Submissions(props) {
84
84
</ div >
85
85
< div styleName = "col-2" > { moment ( s . submissionDate ) . format ( 'MMM DD, YYYY HH:mm' ) } EDT</ div >
86
86
< div styleName = "col-3" >
87
- { s . initialScore . toFixed ( 2 ) } / { s . finalScore . toFixed ( 2 ) }
87
+ { ( s . initialScore || 0 ) . toFixed ( 2 ) } / { ( s . finalScore || 0 ) . toFixed ( 2 ) }
88
88
</ div >
89
89
</ div >
90
90
) )
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ export default function Winners(props) {
27
27
isDesign,
28
28
} = props ;
29
29
30
- results . sort ( ( a , b ) => a . placement - b . placement ) ;
30
+ const maxPlace = Number . MAX_SAFE_INTEGER ;
31
+ results . sort ( ( a , b ) => ( _ . isNumber ( a . placement ) ? a . placement : maxPlace ) -
32
+ ( _ . isNumber ( b . placement ) ? b . placement : maxPlace ) ) ;
31
33
const winners = results . slice ( 0 , prizes . length ) ;
32
34
33
35
return (
Original file line number Diff line number Diff line change @@ -287,7 +287,7 @@ ChallengeDetailPageContainer.propTypes = {
287
287
function extractChallengeDetail ( v3 , v2 , challengeId ) {
288
288
let challenge = { } ;
289
289
if ( ! _ . isEmpty ( v3 ) ) {
290
- challenge = _ . clone ( v3 ) ;
290
+ challenge = _ . defaults ( _ . clone ( v3 ) , { prizes : [ ] } ) ;
291
291
if ( ! _ . isEmpty ( v2 ) ) {
292
292
challenge . numberOfCheckpointsPrizes = v2 . numberOfCheckpointsPrizes ;
293
293
challenge . introduction = v2 . introduction ;
You can’t perform that action at this time.
0 commit comments