Include leading slash in path replacement for result config changes

main
Ben Busby 2022-08-01 14:35:43 -06:00
parent 3f363b0175
commit aa198ed562
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ document.addEventListener("DOMContentLoaded", () => {
countrySelect.onchange = () => {
let str = window.location.href;
n = str.lastIndexOf("search");
n = str.lastIndexOf("/search");
if (n > 0) {
str = str.substring(0, n) +
`search?q=${searchBar.value}&country=${countrySelect.value}`;