Skip to content

Commit

Permalink
Add duplicating children fix from preactjs#61
Browse files Browse the repository at this point in the history
  • Loading branch information
coolavery committed Apr 20, 2022
1 parent 7c4d1bd commit 045738b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ function connectedCallback() {
];
}

// Duplicating children fix for {shadow: false}
// https://github.com/preactjs/preact-custom-element/pull/61
this.innerHTML = '';

(this.hasAttribute('hydrate') ? hydrate : render)(this._vdom, this._root);
}

Expand Down

0 comments on commit 045738b

Please sign in to comment.