Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

set default argument values to undefined instead of {} #3521

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/web/fetch/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ let patchMethodWarning = false
// https://fetch.spec.whatwg.org/#request-class
class Request {
// https://fetch.spec.whatwg.org/#dom-request
constructor (input, init = {}) {
constructor (input, init = undefined) {
if (input === kConstruct) {
return
}
Expand Down
4 changes: 2 additions & 2 deletions lib/web/fetch/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Response {
}

// https://fetch.spec.whatwg.org/#dom-response-json
static json (data, init = {}) {
static json (data, init = undefined) {
webidl.argumentLengthCheck(arguments, 1, 'Response.json')

if (init !== null) {
Expand Down Expand Up @@ -108,7 +108,7 @@ class Response {
}

// https://fetch.spec.whatwg.org/#dom-response
constructor (body = null, init = {}) {
constructor (body = null, init = undefined) {
if (body === kConstruct) {
return
}
Expand Down
Loading