Skip to content

Commit

Permalink
Clean up orphan ReadableStream remaining during parsing response (sin…
Browse files Browse the repository at this point in the history
  • Loading branch information
HaidongPang committed Nov 7, 2024
1 parent 3ba40cc commit d2dcaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/core/Ky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Ky {

const awaitedResult = await result;
const response = awaitedResult.clone();

await awaitedResult.arrayBuffer();
if (type === 'json') {
if (response.status === 204) {
return '';
Expand Down

0 comments on commit d2dcaf5

Please sign in to comment.