mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 02:59:13 +00:00
fix(carousel): add instance check to isCarouselItem (#1684)
This commit is contained in:
@@ -235,8 +235,8 @@ export default class SlCarousel extends ShoelaceElement {
|
||||
}
|
||||
}
|
||||
|
||||
private isCarouselItem(node: HTMLElement): node is SlCarouselItem {
|
||||
return node.tagName.toLowerCase() === 'sl-carousel-item';
|
||||
private isCarouselItem(node: Node): node is SlCarouselItem {
|
||||
return node instanceof Element && node.tagName.toLowerCase() === 'sl-carousel-item';
|
||||
}
|
||||
|
||||
private handleSlotChange = (mutations: MutationRecord[]) => {
|
||||
|
||||
Reference in New Issue
Block a user