This commit is contained in:
David Greenspan
2012-07-17 15:14:54 -07:00
parent 70ca9b98c8
commit 41bfedafe2
2 changed files with 4 additions and 1 deletions

View File

@@ -794,8 +794,9 @@ Meteor.ui = Meteor.ui || {};
visitNodes(srcParent, null, null, function(src) {
// XXX inefficient to scan for match for every node!
// We could skip non-element nodes, except for "range matches"
// We could at least skip non-element nodes, except for "range matches"
// used for constant chunks, which may begin on a non-element.
// But really this shouldn't be a linear search.
var pair = _.find(nodeMatches, function(p) {
return p[1] === src;
});

View File

@@ -36,6 +36,8 @@
var react_data = { events: (name ? Template[name].events : {}),
data: data,
// legacy 'id' preservation
//preserve: { '*[id]': function(n) { return n.id; } },
branch: branch };
return Meteor.ui.chunk(getHtml, react_data);