From a391410705a067b7b9f756b539a09dd26cd79ff2 Mon Sep 17 00:00:00 2001 From: hylom Date: Tue, 30 Jan 2018 01:00:53 +0900 Subject: [PATCH] Web::Controller::Timeline: pupular() now works correctly when period not given --- src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm b/src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm index 26445eb0..b67fadcb 100644 --- a/src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm +++ b/src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm @@ -122,7 +122,7 @@ sub popular { } # fallback - if (%$popular_period == 0) { + if (keys %$popular_period == 0) { $popular_period = {days => 3}; } -- 2.11.0