Skip to content

Commit

Permalink
Update sorting JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Mar 24, 2023
1 parent e50042e commit 9fc387b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/ReportActionsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ function isOptimisticAction(reportAction) {
}

/**
* Sort an array of reportActions by their created timestamp first, and reportActionID second
* This gives us a stable order even in the case of multiple reportActions created on the same millisecond
* Sort an array of reportActions by:
*
* - Finalized actions always are "later" than optimistic actions
* - then sort by created timestamp
* - then sort by reportActionID. This gives us a stable order even in the case of multiple reportActions created on the same millisecond
*
* @param {Array} reportActions
* @param {Boolean} shouldSortInDescendingOrder
Expand Down

0 comments on commit 9fc387b

Please sign in to comment.