This commit is contained in:
Cory LaViska
2021-07-16 08:29:45 -04:00

View File

@@ -43,7 +43,7 @@ export function getTextContent(slot: HTMLSlotElement): string {
export function hasSlot(el: HTMLElement, name?: string) {
// Look for a named slot
if (name) {
return el.querySelector(`[slot="${name}"]`) !== null;
return el.querySelector(`:scope > [slot="${name}"]`) !== null;
}
// Look for a default slot