Skip to content

Commit

Permalink
Merge pull request #68 from vadymshymko/67-the-carousel-breaks-when-t…
Browse files Browse the repository at this point in the history
…here-is-no-children

67 the carousel breaks when there is no children
  • Loading branch information
vadymshymko authored Feb 2, 2023
2 parents 9f8b8a4 + 6610937 commit f051112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-simply-carousel",
"version": "8.4.2",
"version": "8.4.3",
"description": "A simple, lightweight, fully controlled isomorphic (with SSR support) React.js carousel component. Touch enabled and responsive. With support for autoplay and infinity options. Fully customizable",
"files": [
"dist/"
Expand Down
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 f051112

Please sign in to comment.