Skip to content

Commit

Permalink
Avoid a pesky uninitialized value warning.
Browse files Browse the repository at this point in the history
No need for a silly warning if view_exists() is passed undef.
  • Loading branch information
bigpresh committed Feb 16, 2012
1 parent f71b54f commit fb6187b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dancer/Template/Abstract.pm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ sub template {
)->render();
}

sub view_exists { return -e $_[1] }
sub view_exists { return defined $_[1] && -e $_[1] }

1;
__END__
Expand Down

0 comments on commit fb6187b

Please sign in to comment.