summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Text/Handlebars.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm
index ad6617e..836e253 100644
--- a/lib/Text/Handlebars.pm
+++ b/lib/Text/Handlebars.pm
@@ -34,8 +34,7 @@ sub default_functions {
$ref = ref($value);
}
- die "invalid value: $value"
- if !defined($ref) || $ref ne 'HASH';
+ return $vars unless $ref && $ref eq 'HASH';
weaken(my $vars_copy = $vars);
return {