Commit f2600df8 authored by Randall Leeds's avatar Randall Leeds

simplify heatmap reply count code

parent e73be4cc
......@@ -217,12 +217,8 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
.html (d) =>
total = @buckets[d].reduce (total, a) ->
subtotal =
if a.thread.children.length
a.thread.flattenChildren().length
else
0
total + subtotal + 1
subtotal = (a.thread.flattenChildren()?.length or 0) + 1
total + subtotal
, 0
"<div class='label'>#{total}</div><div class='svg'></div>"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment