Skip to content

Commit

Permalink
Avoid tracking parentNode since it's unncessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 31, 2018
1 parent c9208fd commit 1463e3b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/utils/templatize.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,12 @@
// remove and replace slot
} else if (n.localName === 'slot') {
if (hide) {
n.__polymerParent__ = n.parentNode;
n.__polymerReplaced__ = document.createComment('hidden-slot');
n.parentNode.replaceChild(n.__polymerReplaced__, n);
} else {
const parent = n.__polymerParent__;
const replace = n.__polymerReplaced__;
if (parent && replace) {
parent.replaceChild(n, replace);
if (replace) {
replace.parentNode.replaceChild(n, replace);
}
}
}
Expand Down

0 comments on commit 1463e3b

Please sign in to comment.