mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Fix latent (benign) error thrown when removing dom-if via innerHTML.
This commit is contained in:
@@ -251,8 +251,10 @@ export class DomIf extends PolymerElement {
|
||||
if (c$ && c$.length) {
|
||||
// use first child parent, for case when dom-if may have been detached
|
||||
let parent = c$[0].parentNode;
|
||||
for (let i=0, n; (i<c$.length) && (n=c$[i]); i++) {
|
||||
parent.removeChild(n);
|
||||
if (parent) {
|
||||
for (let i=0, n; (i<c$.length) && (n=c$[i]); i++) {
|
||||
parent.removeChild(n);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.__instance = null;
|
||||
|
||||
Reference in New Issue
Block a user