Skip to content
This repository has been archived by the owner on Jul 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #284 from brave/fix_sorting
Browse files Browse the repository at this point in the history
fix sorting
  • Loading branch information
AlexeyBarabash committed Mar 5, 2019
2 parents 3fae96b + 75dddbe commit e4ae888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/s3Helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ module.exports.parseS3Key = function (key) {
}

function compareS3Key (a, b) {
const recordPartIndexA = a.Key.substring(47).split('/')[2]
const recordPartIndexB = b.Key.substring(47).split('/')[2]
const recordPartIndexA = a.Key.substring(47).split('/')[1]
const recordPartIndexB = b.Key.substring(47).split('/')[1]
if (recordPartIndexA < recordPartIndexB) {
return -1
} else if (recordPartIndexA > recordPartIndexB) {
Expand Down

0 comments on commit e4ae888

Please sign in to comment.