From 030455f5bfd48689216b1a48672125988e5a5612 Mon Sep 17 00:00:00 2001 From: himaniraghav3 Date: Thu, 8 May 2025 17:03:05 +0530 Subject: [PATCH] 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 --- src/shared/components/challenge-detail/Registrants/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/challenge-detail/Registrants/index.jsx b/src/shared/components/challenge-detail/Registrants/index.jsx index a97e241b4..5c21256bb 100644 --- a/src/shared/components/challenge-detail/Registrants/index.jsx +++ b/src/shared/components/challenge-detail/Registrants/index.jsx @@ -234,8 +234,8 @@ export default class Registrants extends React.Component { break; } case 'Submitted Date': { - const checkpointA = this.getFinal(a); - const checkpointB = this.getFinal(b); + const checkpointA = this.getFinal(a) || this.getSubmissionDate(a); + const checkpointB = this.getFinal(b) || this.getSubmissionDate(b); if (checkpointA) { valueA = new Date(checkpointA); }