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:
parent
587b537cd6
commit
6d14ad0a76
3 changed files with 8 additions and 7 deletions
|
@ -77,6 +77,7 @@
|
|||
|
||||
function paramsToString(params) {
|
||||
return Object.keys(params)
|
||||
.filter((k) => !!params[k])
|
||||
.map(k => `${encodeURIComponent(k)}=${encodeURIComponent(params[k])}`)
|
||||
.join('&');
|
||||
}
|
||||
|
@ -95,7 +96,7 @@
|
|||
if (response.status < 400) {
|
||||
if (request.dataType === 'json' || request.headers.accept === 'application/json') {
|
||||
return response.json();
|
||||
} else if (request.dataType === 'text' || (response.headers.get('Content-Type') || '').toLowerCase().includes('text/')) {
|
||||
} else if (request.dataType === 'text' || (response.headers.get('Content-Type') || '').toLowerCase().startsWith('text/')) {
|
||||
return response.text();
|
||||
} else {
|
||||
return response;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue