summaryrefslogtreecommitdiffstats
path: root/spec/qunit_spec.js
diff options
context:
space:
mode:
authorAlan Johnson <alan@commondream.net>2011-09-02 10:47:05 -0400
committerAlan Johnson <alan@commondream.net>2011-09-02 10:47:05 -0400
commitc1c455acc80ff17b6ef49abd24d0b01fa21e072a (patch)
tree8587636f245fceec356042ad2a5d55ffaf15dfc4 /spec/qunit_spec.js
parentf2f1f5f9bd2275890720775e8db4bc1ce51bfdef (diff)
downloadhandlebars.js-c1c455acc80ff17b6ef49abd24d0b01fa21e072a.zip
handlebars.js-c1c455acc80ff17b6ef49abd24d0b01fa21e072a.tar.gz
handlebars.js-c1c455acc80ff17b6ef49abd24d0b01fa21e072a.tar.bz2
Reproduced undefined property error.
Diffstat (limited to 'spec/qunit_spec.js')
-rw-r--r--spec/qunit_spec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index b5ce883..45ddcd8 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -957,4 +957,14 @@ test("when inside a block in String mode, .. passes the appropriate context in t
}, {helpers: helpers});
equals(result, "STOP ME FROM READING HACKER NEWS I need-a dad.joke wot", "Proper context variable output");
+});
+
+module("Regressions")
+
+test("GH-94: Cannot read property of undefined", function() {
+ var data = {"books":[{"title":"The origin of species","author":{"name":"Charles Darwin"}},{"title":"Lazarillo de Tormes"}]};
+ var string = "{{#books}}{{title}}{{author.name}}{{/books}}";
+ p(tpl);
+ shouldCompileTo(string, data, "The origin of speciesCharles DarwinLazarillo de Tormes",
+ "Renders without an undefined property error");
}); \ No newline at end of file