Skip to content

Commit

Permalink
Merge pull request #1145 from givepraise/fix/report-issues-2
Browse files Browse the repository at this point in the history
Correct sorting of periods
  • Loading branch information
kristoferlund authored Oct 23, 2023
2 parents 309f620 + 7ccd3d2 commit f302161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/model/periods/periods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const AllPeriods = atom<PeriodDetailsDto[]>({
response.data as PeriodPaginatedResponseDto;
const periods = paginatedResponse.docs;
if (Array.isArray(periods) && periods.length > 0) {
return periods;
return periods.slice().reverse(); // Latest period first
}
}
return [];
Expand Down

0 comments on commit f302161

Please sign in to comment.