Skip to content

Commit

Permalink
change page query param to 1-indexed
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperStormer committed Oct 18, 2023
1 parent 146239d commit ba48959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ import { update_query_params } from "./params";
// prefill page selector
if (params.has("page")) {
for (let page_el of page_els) {
page_el.value = params.get("page") + 1;
page_el.value = params.get("page");
}
}

Expand Down Expand Up @@ -355,7 +355,7 @@ import { update_query_params } from "./params";
}

let params = new URLSearchParams(window.location.search);
params.set("page", page);
params.set("page", page + 1);
history.pushState({}, "", "?" + params);

update_results("page_change");
Expand Down

0 comments on commit ba48959

Please sign in to comment.