Skip to content

Commit 030455f

Browse files
author
himaniraghav3
committed
fix(registrants): sort by submitted date correctly
Previously, the sorting failed when getFinal() returned undefined. Now we fallback to getSubmissionDate() in case of anonymous user Fixes PM-1055
1 parent 02fb0cf commit 030455f

File tree

1 file changed

+2
-2
lines changed
  • src/shared/components/challenge-detail/Registrants

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ export default class Registrants extends React.Component {
234234
break;
235235
}
236236
case 'Submitted Date': {
237-
const checkpointA = this.getFinal(a);
238-
const checkpointB = this.getFinal(b);
237+
const checkpointA = this.getFinal(a) || this.getSubmissionDate(a);
238+
const checkpointB = this.getFinal(b) || this.getSubmissionDate(b);
239239
if (checkpointA) {
240240
valueA = new Date(checkpointA);
241241
}

0 commit comments

Comments
 (0)