Skip to content

Commit

Permalink
fix(carousel): add instance check to isCarouselItem (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
alenaksu authored Oct 25, 2023
1 parent 1087fe2 commit 597a06c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]) => {
Expand Down

0 comments on commit 597a06c

Please sign in to comment.