Skip to content

Commit

Permalink
Temporary fix for errors in some requests
Browse files Browse the repository at this point in the history
  • Loading branch information
chazepps committed Nov 24, 2024
1 parent 8f68a68 commit e9957f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/requests/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const hejRequest = async <Request extends Record<string, unknown> | null,
const text = await response.text();

if (json) {
return JSON.parse(text) as Response;
return JSON.parse(text || '[]') as Response;
}

return text as Response;
Expand Down

0 comments on commit e9957f1

Please sign in to comment.