diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-03 11:40:01 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-03 11:41:17 -0500 |
commit | 3875faa18e63d4bf5336b07279fc36f306900972 (patch) | |
tree | 6ac29210c32ca6b88de3ce2e2e8c568f18a369be /lib | |
parent | 0d485cd2147eb8dd61dbf565fa1a7c6053460ddf (diff) | |
download | text-handlebars-3875faa18e63d4bf5336b07279fc36f306900972.tar.gz text-handlebars-3875faa18e63d4bf5336b07279fc36f306900972.zip |
don't die here, just assume it's a truthy value
this makes things like json booleans work properly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Text/Handlebars.pm | 3 |
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 { |