Skip to content

Commit

Permalink
Add a conditional and a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarratt-drizly committed Nov 23, 2023
1 parent 5204f70 commit 57ccab2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/primitives/src/primitives/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ process.emitWarning = () => {}
class Request extends BaseRequest {
constructor(input, init) {
super(input, init);
this.duplex = 'half';
// If the request has a body, ensure the duplex is set.
if (this.body) {
this.duplex = 'half';
}
}
}

Expand Down

0 comments on commit 57ccab2

Please sign in to comment.