Reproduced undefined property error.

This commit is contained in:
Alan Johnson
2011-09-02 10:47:05 -04:00
parent f2f1f5f9bd
commit c1c455acc8
+10
View File
@@ -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");
});