fix objects that evaulate to false. rafl
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 3c6404a..9fc441e 100644 (file)
@@ -152,7 +152,7 @@ sub forward {
 
     unless ( @{$results} ) {
 
-        unless ( $c->components->{$command} ) {
+        unless ( defined( $c->components->{$command} ) ) {
             my $error =
 qq/Couldn't forward to command "$command". Invalid action or component./;
             $c->error($error);