From 2473f673bca4b4d65a8b91ecc7c6ce399e878858 Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Sat, 7 Sep 2024 18:59:26 +0000 Subject: [PATCH] fix: content-type --- src/api/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/api.ts b/src/api/api.ts index a6ae2d0..e92ce82 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -144,7 +144,7 @@ export class ApiHandler { this.clearResetInterval(route); next(); if (result.length > 0) { - if (response.headers.get('content-type') === 'application/json') { + if (response.headers.get('content-type')?.includes('application/json')) { try { result = JSON.parse(result); } catch (err) {