Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Enter a description of the change.
Browse files Browse the repository at this point in the history
discard optimization to use cloneNode deep in some cases

R=arv
BUG=

Review URL: https://codereview.appspot.com/20030043
  • Loading branch information
rafaelw committed Oct 30, 2013
1 parent 8028ba8 commit ab62e41
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/TemplateBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,7 @@
content.bindingMap_ = map;
}

var instance = map.hasSubTemplate ?
deepCloneIgnoreTemplateContent(content) : content.cloneNode(true);
var instance = deepCloneIgnoreTemplateContent(content);

addMapBindings(instance, map, model, delegate, bound);
// TODO(rafaelw): We can do this more lazily, but setting a sentinel
Expand Down Expand Up @@ -810,7 +809,6 @@
node.isTemplate_ = true;
map = map || [];
map.templateRef = node;
map.hasSubTemplate = true;
}

var child = node.firstChild, index = 0;
Expand All @@ -822,8 +820,6 @@
map = map || [];
map.children = map.children || {};
map.children[index] = childMap;
if (childMap.hasSubTemplate)
map.hasSubTemplate = true;
}

return map;
Expand Down

0 comments on commit ab62e41

Please sign in to comment.