diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-11-21 15:39:21 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-11-21 15:39:21 +0100 |
commit | 0addce7bff7dd87c663e09217659dc0555d93453 (patch) | |
tree | 7ea0a26140da91f560a82adfe20e345324059758 /lib/Travelynx | |
parent | ccfdd8007e136d5d98652d415dda8eb595a2ada9 (diff) |
month overview: distinguish between no stats and no journeys1.18.10
Diffstat (limited to 'lib/Travelynx')
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 9330707..750c8b1 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -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; |