mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(web): API client json detection (#1129)
fix(web/apiclient): fix erroneous json serialization condition
This commit is contained in:
parent
32b8f57d9c
commit
9d0d70c075
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue