fix: relax content type restriction of json response

This commit is contained in:
thepassle 2022-11-09 08:50:09 +01:00 committed by Thomas Allmer
parent e89faca259
commit 7c2a8c3bb6

View file

@ -193,7 +193,7 @@ export class Ajax {
/** @type {any} */ /** @type {any} */
let body = responseText; let body = responseText;
if (response.headers.get('content-type')?.includes('application/json')) { if (response.headers.get('content-type')?.includes('json')) {
try { try {
body = JSON.parse(responseText); body = JSON.parse(responseText);
} catch (error) { } catch (error) {