Skip to content

Commit

Permalink
Merge pull request #1 from HaidongPang/FixOrphanStream
Browse files Browse the repository at this point in the history
Clean up orphan ReadableStream remaining during parsing response (sindresorhus#648)
  • Loading branch information
HaidongPang authored Nov 7, 2024
2 parents 3ba40cc + 810582b commit 54c5344
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();

awaitedResult.body?.cancel();
if (type === 'json') {
if (response.status === 204) {
return '';
Expand Down

0 comments on commit 54c5344

Please sign in to comment.