From 9d0d70c07502b8a616100a7c8eed2d7b9dc72f8f Mon Sep 17 00:00:00 2001 From: stacksmash76 <98354295+stacksmash76@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:12:00 +0200 Subject: [PATCH] fix(web): API client json detection (#1129) fix(web/apiclient): fix erroneous json serialization condition --- web/src/api/APIClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/api/APIClient.ts b/web/src/api/APIClient.ts index 4e48e5d..9787774 100644 --- a/web/src/api/APIClient.ts +++ b/web/src/api/APIClient.ts @@ -110,7 +110,7 @@ export async function HttpClient( // Resolve on success if (response.status >= 200 && response.status < 300) { - if (json) { + if (isJson) { return Promise.resolve(json as T); } else { return Promise.resolve(response as T);