Skip to content

Commit

Permalink
Sort children when creating tree, for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 6, 2019
1 parent a8ecf7f commit 242a315
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/process.js
Expand Up @@ -48,7 +48,7 @@ ProcessInfo.buildProcessTree = function (infos) {
throw new Error(`Invalid entry in processinfo index: ${id}`)
}
const idx = index.processes[id]
node.nodes = idx.children.map(id => infos[id])
node.nodes = idx.children.map(id => infos[id]).sort((a, b) => a.time - b.time)
if (!node.parent) {
treeRoot.nodes.push(node)
}
Expand Down

0 comments on commit 242a315

Please sign in to comment.