Skip to content

Commit

Permalink
add reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
pearl-truss committed Apr 18, 2024
1 parent 5bc2584 commit d9c1df9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export const ChangeHistoryV2 = ({
return submission.cause === 'CONTRACT_SUBMISSION'
}
)
contractSubmissions.forEach((r, index) => {
//Reverse revisions to order from earliest to latest revision. This is to correctly set version for each
// contract & recontract.
const reversedRevisions = [...contractSubmissions].reverse()
reversedRevisions.forEach((r, index) => {
if (r.contractRevision.unlockInfo) {
const newUnlock: flatRevisions = {} as flatRevisions
newUnlock.updatedAt = r.contractRevision.unlockInfo.updatedAt
Expand Down

0 comments on commit d9c1df9

Please sign in to comment.