Skip to content

Commit

Permalink
Sort tree-nodes of the same size by name
Browse files Browse the repository at this point in the history
- This is primarily done to achieve a stable
  sort order in test-cases
  • Loading branch information
nknapp committed May 8, 2017
1 parent cefa825 commit e4f8fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -45,7 +45,7 @@ function toArchy (pkgs, depth) {
}
})
return sortby(result, (node) => {
return -node.size
return -node.size || node._id
})
}

Expand Down

0 comments on commit e4f8fb2

Please sign in to comment.