mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
@ -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();
|
||||||
|
Reference in New Issue
Block a user