Skip to content

Commit

Permalink
Clean up orphan ReadableStream remaining during parsing response (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
HaidongPang committed Nov 7, 2024
1 parent 3ba40cc commit 96a6244
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.body?.cancel();
if (type === 'json') {
if (response.status === 204) {
return '';
Expand Down

0 comments on commit 96a6244

Please sign in to comment.