@prose-reader/core 1.198.0 → 1.199.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5528,7 +5528,7 @@ class HookManager {
5528
5528
  }
5529
5529
  const getItemOffsetFromPageIndex = (pageWidth, pageIndex, itemWidth) => {
5530
5530
  const lastPageOffset = itemWidth - pageWidth;
5531
- const logicalOffset = itemWidth * (pageIndex * pageWidth) / itemWidth;
5531
+ const logicalOffset = itemWidth * (pageIndex * pageWidth) / (itemWidth || 1);
5532
5532
  return Math.max(0, Math.min(lastPageOffset, logicalOffset));
5533
5533
  };
5534
5534
  const calculateNumberOfPagesForItem = (itemWidth, pageWidth) => {