From 7c2a8c3bb6322b696de4ff6c124653b81eba4b60 Mon Sep 17 00:00:00 2001 From: thepassle Date: Wed, 9 Nov 2022 08:50:09 +0100 Subject: [PATCH] fix: relax content type restriction of json response --- packages/ajax/src/Ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ajax/src/Ajax.js b/packages/ajax/src/Ajax.js index 967a82c93..4ea967bc5 100644 --- a/packages/ajax/src/Ajax.js +++ b/packages/ajax/src/Ajax.js @@ -193,7 +193,7 @@ export class Ajax { /** @type {any} */ let body = responseText; - if (response.headers.get('content-type')?.includes('application/json')) { + if (response.headers.get('content-type')?.includes('json')) { try { body = JSON.parse(responseText); } catch (error) {