Skip to content

Commit

Permalink
Fixed ZeroDivisionError in html formatter.
Browse files Browse the repository at this point in the history
  • Loading branch information
hennes-maertins committed Mar 27, 2016
1 parent d030c60 commit 7faa525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions formatters/html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def format_dialog(dialog, messages)
last = msg['media']['last_name']
msg_body = "<div class=contact>Contact: #{first} <!--first-last-->#{last}, +#{phone}</div>"
end
if msg['event'] == 'service' or msg['service'] or (message_count % timestamps_every == 0 and timestamps_every > 0)
if message_count % timestamps_every == 0
if msg['event'] == 'service' or msg['service'] or (timestamps_every > 0 and message_count % timestamps_every == 0)
if timestamps_every > 0 and message_count % timestamps_every == 0
text = date_message
else
if get_full_name(msg['from']) != '' # Some messages have no properly filled 'from'
Expand Down

0 comments on commit 7faa525

Please sign in to comment.