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:
parent
9cff951b4b
commit
9f65fcab71
@ -185,12 +185,12 @@ function changeItemsPage(next) {
|
|||||||
else if (!next && pagination.prev) page --;
|
else if (!next && pagination.prev) page --;
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
filters["page"] = page;
|
loadTicketItems(page);
|
||||||
loadTicketItems();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadTicketItems() {
|
function loadTicketItems(page=1) {
|
||||||
updateInterfaceState("loading");
|
updateInterfaceState("loading");
|
||||||
|
filters["page"] = page;
|
||||||
|
|
||||||
fetchTicketsPromise(filters).then((response) => {
|
fetchTicketsPromise(filters).then((response) => {
|
||||||
// Update the counts to show how many tickets were found
|
// Update the counts to show how many tickets were found
|
||||||
|
Loading…
x
Reference in New Issue
Block a user