fix(web): API client json detection (#1129)

fix(web/apiclient): fix erroneous json serialization condition
This commit is contained in:
stacksmash76 2023-09-19 18:12:00 +02:00 committed by GitHub
parent 32b8f57d9c
commit 9d0d70c075
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ export async function HttpClient<T = unknown>(
// Resolve on success
if (response.status >= 200 && response.status < 300) {
if (json) {
if (isJson) {
return Promise.resolve<T>(json as T);
} else {
return Promise.resolve<T>(response as T);