1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fixed review comments

This commit is contained in:
Cromefire_ 2020-05-28 23:06:36 +02:00
parent 57a0cd7713
commit d36a8994fb
No known key found for this signature in database
GPG key ID: D3D3DB179F435F0C
3 changed files with 11 additions and 6 deletions

View file

@ -75,10 +75,15 @@
});
}
/**
* @param params {Record<string, string | number | boolean>}
* @returns {string} Query string
*/
function paramsToString(params) {
return Object.keys(params)
.filter((k) => !!params[k])
.map(k => `${encodeURIComponent(k)}=${encodeURIComponent(params[k])}`)
return Object.entries(params)
// eslint-disable-next-line no-unused-vars
.filter(([_, v]) => v !== null && v !== undefined)
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
.join('&');
}