Loading lib/Travelynx/Model/Journeys.pm +3 −3 Original line number Diff line number Diff line Loading @@ -749,9 +749,9 @@ sub get_months_for_year { month => $row->{month} } )->expand->hash; if ($stats) { $ret[ $row->{month} - 1 ][2] = $stats->{data}; } # undef -> no journeys for this month; empty hash -> no cached stats $ret[ $row->{month} - 1 ][2] = $stats->{data} // {}; } } return @ret; Loading templates/_history_months_for_year.html.ep +3 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,9 @@ % for my $month (journeys->get_months_for_year(uid => current_user->{id}, year => $year)) { % if (defined $month->[2]) { <a class="collection-item" href="/history/<%= $month->[0] %>"><%= $month->[1] %> % if (defined $month->[2]{km_route}) { <span class="secondary-content"><%= sprintf('%.f', $month->[2]{km_route}) %> km</span> % } </a> % } % else { Loading Loading
lib/Travelynx/Model/Journeys.pm +3 −3 Original line number Diff line number Diff line Loading @@ -749,9 +749,9 @@ sub get_months_for_year { month => $row->{month} } )->expand->hash; if ($stats) { $ret[ $row->{month} - 1 ][2] = $stats->{data}; } # undef -> no journeys for this month; empty hash -> no cached stats $ret[ $row->{month} - 1 ][2] = $stats->{data} // {}; } } return @ret; Loading
templates/_history_months_for_year.html.ep +3 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,9 @@ % for my $month (journeys->get_months_for_year(uid => current_user->{id}, year => $year)) { % if (defined $month->[2]) { <a class="collection-item" href="/history/<%= $month->[0] %>"><%= $month->[1] %> % if (defined $month->[2]{km_route}) { <span class="secondary-content"><%= sprintf('%.f', $month->[2]{km_route}) %> km</span> % } </a> % } % else { Loading