Skip to content

Commit

Permalink
Fix regression that broke display of log messages created with ancien…
Browse files Browse the repository at this point in the history
…t Log::Defer versions back when timers were stored in a hash ref
  • Loading branch information
hoytech committed Dec 12, 2014
1 parent 01f89de commit ab3edc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/log-defer-viz
Expand Up @@ -410,7 +410,9 @@ sub handle_entry {
}

if ($opt->{timers}) {
print Log::Defer::Viz::render_timers(width => $columns-10, timers => $entry->{timers}) if @{ $entry->{timers} };
print Log::Defer::Viz::render_timers(width => $columns-10, timers => $entry->{timers})
if (ref $entry->{timers} eq 'ARRAY' && @{ $entry->{timers} }) ||
(ref $entry->{timers} eq 'HASH' && %{ $entry->{timers} });
}

if ($entry->{data}) {
Expand Down

0 comments on commit ab3edc3

Please sign in to comment.