Skip to content

Commit 045738b

Browse files
committed
Add duplicating children fix from preactjs#61
1 parent 7c4d1bd commit 045738b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ function connectedCallback() {
9191
];
9292
}
9393

94+
// Duplicating children fix for {shadow: false}
95+
// https://github.com/preactjs/preact-custom-element/pull/61
96+
this.innerHTML = '';
97+
9498
(this.hasAttribute('hydrate') ? hydrate : render)(this._vdom, this._root);
9599
}
96100

0 commit comments

Comments
 (0)