Skip to content

Commit

Permalink
refactor(fetch): use optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Mar 21, 2022
1 parent d6668c5 commit e81c48d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ class Request {
}

// 1. If this is unusable, then throw a TypeError.
if (this.bodyUsed || (this.body && this.body.locked)) {
if (this.bodyUsed || this.body?.locked) {
throw new TypeError('unusable')
}

Expand Down

0 comments on commit e81c48d

Please sign in to comment.