fixed invalid page error

The page would be above 1, and then would query the API with a new filter that reduced the results to a single page, causing an error.
This commit is contained in:
Corban-Lee Jones 2024-01-18 20:22:15 +00:00
parent 9cff951b4b
commit 9f65fcab71

View File

@ -185,12 +185,12 @@ function changeItemsPage(next) {
else if (!next && pagination.prev) page --;
else return;
filters["page"] = page;
loadTicketItems();
loadTicketItems(page);
}
function loadTicketItems() {
function loadTicketItems(page=1) {
updateInterfaceState("loading");
filters["page"] = page;
fetchTicketsPromise(filters).then((response) => {
// Update the counts to show how many tickets were found