From 1463e3b2561ce14adcc3f89eed293b929da0096d Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Wed, 31 Jan 2018 11:58:11 -0800 Subject: [PATCH] Avoid tracking parentNode since it's unncessary --- lib/utils/templatize.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/utils/templatize.html b/lib/utils/templatize.html index 18a1161095..85812500b9 100644 --- a/lib/utils/templatize.html +++ b/lib/utils/templatize.html @@ -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); } } }