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

Commit

Permalink
avoid calling isTemplate for every instance created
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Sep 5, 2013
1 parent f0cd16a commit ad64879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TemplateBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@

function deepCloneIgnoreTemplateContent(node, delegate) {
var clone = node.cloneNode(false);
if (isTemplate(clone)) {
if (node.isTemplate_) {
return clone;
}

Expand All @@ -799,6 +799,7 @@
function createInstanceBindingMap(node, delegatePrepareBindingFn) {
var map = getBindings(node, delegatePrepareBindingFn);
if (isTemplate(node)) {
node.isTemplate_ = true;
map = map || [];
map.templateRef = node;
map.hasSubTemplate = true;
Expand Down

0 comments on commit ad64879

Please sign in to comment.