Skip to content

Commit

Permalink
Patch only expands slots when shadowRoot is false
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed May 29, 2024
1 parent 5cbea29 commit 7e0ed71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const MorphdomMixin = (superclass) => class extends superclass {
? this.shadowRoot
: this

if (this['expandSlots']) {
if (!this.shadowRoot && this['expandSlots']) {
const slotEl = document.createElement('div')
const slottedElements = root.querySelectorAll('[slot=""]')
const slottedElements = root.querySelectorAll('[slot=" "]')
for (const value of slottedElements.values()) {
slotEl.appendChild(value)
}
Expand Down

0 comments on commit 7e0ed71

Please sign in to comment.