Skip to content

Commit

Permalink
fix(search): 🐛 check if article path has question mark before adding …
Browse files Browse the repository at this point in the history
…search params

Fixes: #903
  • Loading branch information
alistair3149 committed Jul 8, 2024
1 parent a883f9d commit ecc4cca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/skins.citizen.search/urlGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function urlGenerator( config ) {
return articlePath;
} else {
const searchParams = new URLSearchParams( params );
return `${ articlePath }?${ searchParams.toString() }`;
const paramsPrefix = articlePath.includes('?') ? '&' : '?';
return articlePath + paramsPrefix + searchParams.toString();
}
}
};
Expand Down

0 comments on commit ecc4cca

Please sign in to comment.