fix for defaults layout

This commit is contained in:
Fayland Lam authored and Graham Ollis committed 2013-04-26 13:35:46 -04:00
1 parent 9be62a9c2c
commit fe963f6511
2 files changed
+42 -1

No files matched your search

+5 -1
View File
@@ -81,12 +81,16 @@ sub _render {
$t = 'inline' if defined $inline;
return unless $t;
my $helper = Mojolicious::Plugin::TtRenderer::Helper->new(ctx => $c);
# Purge previous result
$$output = '';
# fixes for t/lite_app_with_default_layouts.t
unless ($c->stash->{layout}) {
$c->stash->{content} ||= $c->stash->{'mojo.content'}->{content};
}
my @params = ({%{$c->stash}, c => $c, h => $helper}, $output, {binmode => ':utf8'});
my $provider = $self->tt->{SERVICE}->{CONTEXT}->{LOAD_TEMPLATES}->[0];
$provider->options($options);