Skip to content

Commit

Permalink
fix current page larger than possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed May 5, 2023
1 parent 7e84aaf commit e413f83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/components/History/Modals/SelectorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ watch(
() => filtered.value,
() => {
filtered.value.sort((a, b) => (a.update_time < b.update_time ? 1 : -1));
const highestPage = Math.ceil(filtered.value.length / props.perPage);
if (highestPage < currentPage.value) {
currentPage.value = highestPage;
}
}
);
Expand Down

0 comments on commit e413f83

Please sign in to comment.