Skip to content

Commit

Permalink
Merge pull request #9 from goto-bus-stop/fix-no-data
Browse files Browse the repository at this point in the history
Fix crash when no data was recorded
  • Loading branch information
mcollina authored Aug 22, 2018
2 parents 9dba7d3 + 4d70daf commit 9e0879c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ function flameGraph (opts) {
.sort(doSort)

// Make "all stacks" as wide as every visible stack.
data.value = data.children.reduce(sumChildValues, 0)
data.value = data.children ? data.children.reduce(sumChildValues, 0) : 0
})

time('partition', function () {
Expand Down

0 comments on commit 9e0879c

Please sign in to comment.