@one-paragon/angular-utilities 2.1.1 → 2.1.2

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.
@@ -4911,7 +4911,7 @@ class PaginatorComponent {
4911
4911
  untracked(() => {
4912
4912
  if (paginator) {
4913
4913
  paginator.length = dataLength;
4914
- const maxIndex = Math.ceil(dataLength / paginator.pageSize) - 1;
4914
+ const maxIndex = Math.max(0, Math.ceil(dataLength / paginator.pageSize) - 1);
4915
4915
  if (paginator.pageIndex > maxIndex) {
4916
4916
  paginator.pageIndex = maxIndex;
4917
4917
  this.state.setCurrentPage(maxIndex);