allow undefined template or snippet text
This commit is contained in:
parent
5cb384ec73
commit
1e2b6fd0c2
2 changed files with 11 additions and 6 deletions
|
|
@ -54,7 +54,10 @@ property snippetPacked => (
|
|||
sub _build_snippetPacked {
|
||||
my $self = shift;
|
||||
my $snippet = $self->snippet;
|
||||
if ( $self->mimeType eq "text/html" ) {
|
||||
if ( !defined $snippet ) {
|
||||
# do nothing
|
||||
}
|
||||
elsif ( $self->mimeType eq "text/html" ) {
|
||||
HTML::Packer::minify( \$snippet, {
|
||||
remove_comments => 1,
|
||||
do_javascript => "shrink",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue