From d6b23272e3e6bc42a9b3659f3888b9c1881d48f5 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 26 Jul 2013 12:04:27 -0400 Subject: [PATCH] Don't try to serialize if there's nothing to serialize Signed-off-by: Shea Levy --- src/lib/Hydra/Controller/Root.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index ca57ce1c..cde5fb10 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -239,7 +239,7 @@ sub end : ActionClass('RenderView') { $c->response->status . " " . HTTP::Status::status_message($c->response->status); } - $c->forward('serialize'); + $c->forward('serialize') if defined $c->stash->{resource}; } sub serialize : ActionClass('Serialize') { }