fix linkTo

This commit is contained in:
Norbert de Langen 2022-05-11 16:57:41 +02:00
parent da6e6ebd97
commit 535eb811b0
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762

View File

@ -17,7 +17,10 @@ interface ParamsCombo {
function parseQuery(queryString: string) {
const query: Record<string, string> = {};
const pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');
const pairs = (queryString[0] === '?' ? queryString.substring(1) : queryString)
.split('&')
.filter(Boolean);
// eslint-disable-next-line no-plusplus
for (let i = 0; i < pairs.length; i++) {
const pair = pairs[i].split('=');