allow undefined template or snippet text
This commit is contained in:
parent
99386f52eb
commit
8597bdbb0f
2 changed files with 11 additions and 6 deletions
|
|
@ -80,11 +80,13 @@ property templatePacked => (
|
|||
sub _build_templatePacked {
|
||||
my $self = shift;
|
||||
my $template = $self->template;
|
||||
HTML::Packer::minify( \$template, {
|
||||
remove_comments => 1,
|
||||
do_javascript => 'shrink',
|
||||
do_stylesheet => 'minify',
|
||||
} );
|
||||
if (defined $template) {
|
||||
HTML::Packer::minify( \$template, {
|
||||
remove_comments => 1,
|
||||
do_javascript => 'shrink',
|
||||
do_stylesheet => 'minify',
|
||||
} );
|
||||
}
|
||||
$template;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue