From: hylom Date: Fri, 15 Feb 2019 11:03:40 +0000 (+0900) Subject: Plugin::Preprocessor: fix get_path() X-Git-Tag: v0.1.8~12 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1eb416f16f5cb989c8c2e18eab00c3b6aa0d84b9;p=newslash%2Fnewslash.git Plugin::Preprocessor: fix get_path() --- diff --git a/src/newslash_web/lib/Newslash/Plugin/Preprocessor.pm b/src/newslash_web/lib/Newslash/Plugin/Preprocessor.pm index 7b4d6782..9438e350 100644 --- a/src/newslash_web/lib/Newslash/Plugin/Preprocessor.pm +++ b/src/newslash_web/lib/Newslash/Plugin/Preprocessor.pm @@ -286,14 +286,11 @@ sub get_path { # regenerate contents my $targets = $self->{conf}->{targets} || {}; if ($targets->{$path}) { - my $rs = $self->_generate($targets->{$path}); - if ($rs) { - $content = $rs->{content}; - } + $content = $self->_generate($targets->{$path}); } } - if ($content) { + if ($content && $content->{path}) { return $content->{path}; } else {