Skip to content

Commit a148613

Browse files
committed
Fixed the sorting of review periods to make it quicker to find the open review periods.
1 parent 4cbc8b9 commit a148613

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web-ui/src/components/reviews/periods/ReviewPeriods.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,14 @@ const ReviewPeriods = ({ onPeriodSelected, mode }) => {
389389
) : periods.length > 0 ? (
390390
periods
391391
.sort((a, b) => {
392+
const aName = (a.name || '');
392393
return a.reviewStatus === b.reviewStatus
393-
? (a.name || '').localeCompare(b.name)
394+
? aName.localeCompare(b.name)
394395
: a.reviewStatus === ReviewStatus.OPEN
395396
? -1
396-
: 1;
397+
: (b.reviewStatus === ReviewStatus.OPEN
398+
? 1
399+
: aName.localeCompare(b.name));
397400
})
398401
.map((period) => (
399402
<div>

0 commit comments

Comments
 (0)