Skip to content

Commit

Permalink
Fix get active slide width
Browse files Browse the repository at this point in the history
  • Loading branch information
vadymshymko committed Feb 2, 2023
1 parent 9f8b8a4 commit ce300e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function ReactSimplyCarousel({
: ([...itemsListChildren] as HTMLElement[]);

const activeSlideWidth =
slidesHTMLElements[curActiveSlideIndex].offsetWidth;
slidesHTMLElements[curActiveSlideIndex]?.offsetWidth;

const innerMaxWidth = itemsToShow
? slidesHTMLElements.reduce((result, item, index) => {
Expand Down

0 comments on commit ce300e3

Please sign in to comment.