From 3875faa18e63d4bf5336b07279fc36f306900972 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 3 Oct 2012 11:40:01 -0500 Subject: don't die here, just assume it's a truthy value this makes things like json booleans work properly --- lib/Text/Handlebars.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/Text/Handlebars.pm') 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 { -- cgit v1.2.3-54-g00ecf