fix: content-type

This commit is contained in:
MARCROCK22 2024-09-07 18:59:26 +00:00
parent bcadf6022c
commit 2473f673bc

View File

@ -144,7 +144,7 @@ export class ApiHandler {
this.clearResetInterval(route); this.clearResetInterval(route);
next(); next();
if (result.length > 0) { if (result.length > 0) {
if (response.headers.get('content-type') === 'application/json') { if (response.headers.get('content-type')?.includes('application/json')) {
try { try {
result = JSON.parse(result); result = JSON.parse(result);
} catch (err) { } catch (err) {