Skip to main content
Sign in
Snippets Groups Projects
Commit 9eef4448 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Don't reverse organes in place

parent 7ef30c86
No related branches found
No related tags found
No related merge requests found
...@@ -203,7 +203,7 @@ export function getOrganeAtDate( ...@@ -203,7 +203,7 @@ export function getOrganeAtDate(
// //
// Note: This function assumes that organes are sorted in chronological order of // Note: This function assumes that organes are sorted in chronological order of
// organe.viMoDe.dateDebut. // organe.viMoDe.dateDebut.
for (const organe of organes.reverse()) { for (const organe of [...organes].reverse()) {
if ((organe.viMoDe.dateDebut as unknown as string) <= date) { if ((organe.viMoDe.dateDebut as unknown as string) <= date) {
return organe return organe
} }
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment