diff options
author | kpdecker <kpdecker@gmail.com> | 2013-11-03 10:54:24 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-11-03 10:58:37 -0600 |
commit | ded0a1617fda248252a92d71b12c62a5e8536c33 (patch) | |
tree | 62ee34c5f6d749365872bd8f37a74a1431d66017 /spec/partials.js | |
parent | 88fefc1521641084d18fe1abf9697a852eedf28c (diff) | |
download | handlebars.js-ded0a1617fda248252a92d71b12c62a5e8536c33.zip handlebars.js-ded0a1617fda248252a92d71b12c62a5e8536c33.tar.gz handlebars.js-ded0a1617fda248252a92d71b12c62a5e8536c33.tar.bz2 |
Protect context-lookups from undefined values
Fixes #166
Fixes #587
Diffstat (limited to 'spec/partials.js')
-rw-r--r-- | spec/partials.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/partials.js b/spec/partials.js index fa2fa56..7ff9d3c 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -16,6 +16,13 @@ describe('partials', function() { "Partials can be passed a context"); }); + it("partials with undefined context", function() { + var string = "Dudes: {{>dude dudes}}"; + var partial = "{{foo}} Empty"; + var hash = {}; + shouldCompileToWithPartials(string, [hash, {}, {dude: partial}], true, "Dudes: Empty"); + }); + it("partial in a partial", function() { var string = "Dudes: {{#dudes}}{{>dude}}{{/dudes}}"; var dude = "{{name}} {{> url}} "; |