OSDN Git Service

Web::Controller::Timeline: pupular() now works correctly when period not given
authorhylom <hylom@users.sourceforge.jp>
Mon, 29 Jan 2018 16:00:53 +0000 (01:00 +0900)
committerhylom <hylom@users.sourceforge.jp>
Mon, 29 Jan 2018 16:00:53 +0000 (01:00 +0900)
src/newslash_web/lib/Newslash/Web/Controller/Timeline.pm

index 26445eb..b67fadc 100644 (file)
@@ -122,7 +122,7 @@ sub popular {
     }
 
     # fallback
-    if (%$popular_period == 0) {
+    if (keys %$popular_period == 0) {
         $popular_period = {days => 3};
     }