nuka-carousel
Advanced tools
Comparing version 8.0.0 to 8.0.1
@@ -191,5 +191,7 @@ "use strict"; | ||
const remainder = scrollWidth - visibleWidth; | ||
if (visibleWidth === 0) | ||
return; | ||
switch (scrollDistance) { | ||
case "screen": { | ||
const pageCount = Math.ceil(scrollWidth / visibleWidth); | ||
const pageCount = Math.round(scrollWidth / visibleWidth); | ||
setTotalPages(pageCount); | ||
@@ -211,3 +213,3 @@ setScrollOffset(arraySeq(pageCount, visibleWidth)); | ||
default: { | ||
if (typeof scrollDistance === "number") { | ||
if (typeof scrollDistance === "number" && scrollDistance > 0) { | ||
const pageCount = Math.ceil(remainder / scrollDistance) + 1; | ||
@@ -214,0 +216,0 @@ setTotalPages(pageCount); |
{ | ||
"name": "nuka-carousel", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"description": "Pure React Carousel", | ||
@@ -78,3 +78,3 @@ "main": "dist/index.js", | ||
"test:ci": "pnpm run test:unit:ci", | ||
"test:unit": "jest --testPathIgnorePatterns=\\(/es /lib\\)", | ||
"test:unit": "jest", | ||
"test:unit:ci": "pnpm run test:unit", | ||
@@ -81,0 +81,0 @@ "test:unit:watch": "pnpm run test:unit --watchAll", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
103733
1049
0