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); } } }