From f226e4d348f2b9cd54358404fc5ac818e8c824aa Mon Sep 17 00:00:00 2001 From: hylom Date: Mon, 29 Jan 2018 19:05:22 +0900 Subject: [PATCH] Model::Timeline: _select_tags() return correctly when blank items given --- src/newslash_web/lib/Newslash/Model/Timeline.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/newslash_web/lib/Newslash/Model/Timeline.pm b/src/newslash_web/lib/Newslash/Model/Timeline.pm index 74ca617b..a54997a7 100644 --- a/src/newslash_web/lib/Newslash/Model/Timeline.pm +++ b/src/newslash_web/lib/Newslash/Model/Timeline.pm @@ -27,6 +27,8 @@ sub _select_tags { my ($self, $items) = @_; return if !$items; + return 1 if !@$items; + my @globj_ids = map { $_->{globjid} } @$items; my @placeholders = map { "?" } @globj_ids; my $placeholder = join(", ", @placeholders); -- 2.11.0