parent
e4660a5ba2
commit
0c880def5e
|
@ -149,8 +149,8 @@ async function getResponseContent(response) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const responseContentType = response.headers.get('Content-Type');
|
const responseContentType = response.headers.get('Content-Type') || '';
|
||||||
const subType = responseContentType.split('/').pop();
|
const subType = responseContentType.split(';')[0].split('/').pop();
|
||||||
|
|
||||||
if (subType === 'javascript' || subType === 'json') {
|
if (subType === 'javascript' || subType === 'json') {
|
||||||
return await response.json();
|
return await response.json();
|
||||||
|
|
Loading…
Reference in New Issue