aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Hunter <justin.d.hunter@gmail.com>2011-02-28 17:18:55 -0800
committerJustin Hunter <justin.d.hunter@gmail.com>2011-03-04 17:49:27 -0800
commit4746f5d682f63f35eab73da9f7ff47138809b9bc (patch)
tree5621e516e53ea63ee49e889f733c086c1d2b3ff7
parent9be81e194a68c4d49215701c65da3c5a264c6384 (diff)
downloadreaction-4746f5d682f63f35eab73da9f7ff47138809b9bc.tar.gz
reaction-4746f5d682f63f35eab73da9f7ff47138809b9bc.zip
fix for undef bodies
-rw-r--r--lib/Reaction/UI/Window.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Reaction/UI/Window.pm b/lib/Reaction/UI/Window.pm
index 0289b39..be82198 100644
--- a/lib/Reaction/UI/Window.pm
+++ b/lib/Reaction/UI/Window.pm
@@ -28,7 +28,7 @@ sub _build_view {
sub flush {
my ($self) = @_;
my $res = $self->ctx->res;
- if ( $res->status =~ /^3/ || length($res->body) ) {
+ if ( $res->status =~ /^3/ || ( defined $res->body && length($res->body) ) ) {
$res->content_type('text/plain') unless $res->content_type;
return;
}