mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
fix bug that happened when a template contained another template as its first child
This commit is contained in:
@@ -79,7 +79,8 @@ Sky._def_template = function (name, raw_func) {
|
||||
if (replacement) {
|
||||
elt.replaceChild(replacement, child);
|
||||
delete Sky._pending_partials[child.id];
|
||||
child = elt.childNodes[i];
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
traverse(child);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
test("template assembly", function () {
|
||||
// Test for a bug that made it to production -- after a replacement,
|
||||
// also check the newly replaced node for replacements
|
||||
var x = Template.test_assembly_3();
|
||||
var x = Template.test_assembly_0();
|
||||
assert.lengthIs(x.childNodes, 1);
|
||||
});
|
||||
|
||||
|
||||
// Test that if a template throws an error, then pending_partials is
|
||||
// cleaned up properly (that template rendering doesn't break..)
|
||||
Reference in New Issue
Block a user