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 5790765 commit 35e44b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ function connectedCallback() {
{ ...this._props, context },
toVdom(this, this._vdomComponent)
);

// 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 35e44b4

Please sign in to comment.