Skip to content

Commit

Permalink
use URLSearchParams
Browse files Browse the repository at this point in the history
  • Loading branch information
mawinter69 committed May 6, 2024
1 parent b3cdf64 commit 3b02b44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion war/src/main/js/components/search-box/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function init() {
comp.appendChild(ul);

async function dataSrc(val) {
let url = searchURL + "suggest?query=" + val;
const params = new URLSearchParams({ query: val });
let url = searchURL + "suggest?" + params;
const result = await fetch(url);
const data = await result.json();
const list = [];
Expand Down

0 comments on commit 3b02b44

Please sign in to comment.