bm-core-ui 2.10.3 → 2.10.4

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.
@@ -4344,7 +4344,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
4344
4344
  }
4345
4345
 
4346
4346
  do {
4347
- const startingIndexPath = nextIndexPath;
4347
+ const startingIndexPath = nextIndexPath ?? BMIndexPathNone;
4348
4348
 
4349
4349
  if (!nextIndexPath) {
4350
4350
  // If no index path is currently highlighted, highlight the first index path in the data set.
@@ -4664,7 +4664,7 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
4664
4664
  let previousRow;
4665
4665
 
4666
4666
  // Find the next row, if any
4667
- if (rowIndex >= 0) {
4667
+ if (rowIndex > 0) {
4668
4668
  const previousRowIndex = rowIndex - 1;
4669
4669
  previousRow = sectionRows[previousRowIndex];
4670
4670
  }
@@ -4673,7 +4673,8 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
4673
4673
  let sectionIndex = section - 1;
4674
4674
  while (sectionIndex >= 0) {
4675
4675
  if (this.collectionView.numberOfObjectsInSectionAtIndex(sectionIndex)) {
4676
- previousRow = this.cachedLayout.sections[sectionIndex].sectionRows[this.cachedLayout.sections[sectionIndex].sectionRows.length - 1];
4676
+ // NOTE: When using automatic cell size, there can be fewer cached sections than there are in the data set
4677
+ previousRow = this.cachedLayout.sections[sectionIndex]?.rows[(this.cachedLayout.sections[sectionIndex]?.rows.length || 0) - 1];
4677
4678
  break;
4678
4679
  }
4679
4680
  sectionIndex--;
@@ -4803,7 +4804,7 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
4803
4804
  let sectionIndex = section + 1;
4804
4805
  while (sectionIndex < sectionCount) {
4805
4806
  if (this.collectionView.numberOfObjectsInSectionAtIndex(sectionIndex)) {
4806
- nextRow = this.cachedLayout.sections[sectionIndex].sectionRows[0];
4807
+ nextRow = this.cachedLayout.sections[sectionIndex]?.rows[0];
4807
4808
  break;
4808
4809
  }
4809
4810
  sectionIndex++;