diff --git a/lib/web/fetch/request.js b/lib/web/fetch/request.js index 5caf385c685..a91ce351bed 100644 --- a/lib/web/fetch/request.js +++ b/lib/web/fetch/request.js @@ -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 } diff --git a/lib/web/fetch/response.js b/lib/web/fetch/response.js index 9cf5d8018f2..9e0ab867841 100644 --- a/lib/web/fetch/response.js +++ b/lib/web/fetch/response.js @@ -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) { @@ -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 }