can be const

This commit is contained in:
Florian Dold 2020-06-21 18:19:51 +05:30
parent 3903513913
commit 76fffdedd7
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -28,7 +28,7 @@ const paytoPfx = "payto://";
export function addPaytoQueryParams(s: string, params: { [name: string]: string }): string {
const [acct, search] = s.slice(paytoPfx.length).split("?");
const searchParams = new URLSearchParams(search || "");
for (let k of Object.keys(params)) {
for (const k of Object.keys(params)) {
searchParams.set(k, params[k]);
}
return paytoPfx + acct + "?" + searchParams.toString();