diff options
author | kpdecker <kpdecker@gmail.com> | 2014-07-12 11:43:45 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2014-07-12 11:43:45 -0500 |
commit | 1fb7b51ee6bb8f4a2e395821a4648333a699a982 (patch) | |
tree | 50341e601dcec1e7afd119f0f43bd7ee867d11d1 /spec/regressions.js | |
parent | c90cfe247cf1108f94fd97b4e93a42f4a49d3516 (diff) | |
download | handlebars.js-1fb7b51ee6bb8f4a2e395821a4648333a699a982.zip handlebars.js-1fb7b51ee6bb8f4a2e395821a4648333a699a982.tar.gz handlebars.js-1fb7b51ee6bb8f4a2e395821a4648333a699a982.tar.bz2 |
Fix rendering of paths that resolve to zero
Fixes #820
Diffstat (limited to 'spec/regressions.js')
-rw-r--r-- | spec/regressions.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/regressions.js b/spec/regressions.js index 214a142..c633a21 100644 --- a/spec/regressions.js +++ b/spec/regressions.js @@ -122,6 +122,10 @@ describe('Regressions', function() { shouldCompileTo('{{#foo}} This is {{bar}} ~ {{/foo}}', {foo: 0, bar: 'OK'}, ' This is ~ '); }); + it('GH-820: zero pathed rendering', function() { + shouldCompileTo('{{foo.bar}}', {foo: 0}, ''); + }); + if (Handlebars.AST) { it("can pass through an already-compiled AST via compile/precompile", function() { equal(Handlebars.compile(new Handlebars.AST.ProgramNode([ new Handlebars.AST.ContentNode("Hello")]))(), 'Hello'); |