File tree 2 files changed +4
-11
lines changed
2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,7 @@ class FormData {
61
61
62
62
// The delete(name) method steps are to remove all entries whose name
63
63
// is name from this’s entry list.
64
- const next = [ ]
65
- for ( const entry of this [ kState ] ) {
66
- if ( entry . name !== name ) {
67
- next . push ( entry )
68
- }
69
- }
70
-
71
- this [ kState ] = next
64
+ this [ kState ] = this [ kState ] . filter ( entry => entry . name !== name )
72
65
}
73
66
74
67
get ( name ) {
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class Request {
128
128
}
129
129
130
130
// 10. If init["window"] exists and is non-null, then throw a TypeError.
131
- if ( init . window !== undefined && init . window != null ) {
131
+ if ( init . window != null ) {
132
132
throw new TypeError ( `'window' option '${ window } ' must be null` )
133
133
}
134
134
@@ -427,7 +427,7 @@ class Request {
427
427
// non-null, and request’s method is `GET` or `HEAD`, then throw a
428
428
// TypeError.
429
429
if (
430
- ( ( init . body !== undefined && init . body != null ) || inputBody != null ) &&
430
+ ( init . body != null || inputBody != null ) &&
431
431
( request . method === 'GET' || request . method === 'HEAD' )
432
432
) {
433
433
throw new TypeError ( 'Request with GET/HEAD method cannot have body.' )
@@ -437,7 +437,7 @@ class Request {
437
437
let initBody = null
438
438
439
439
// 36. If init["body"] exists and is non-null, then:
440
- if ( init . body !== undefined && init . body != null ) {
440
+ if ( init . body != null ) {
441
441
// 1. Let Content-Type be null.
442
442
// 2. Set initBody and Content-Type to the result of extracting
443
443
// init["body"], with keepalive set to request’s keepalive.
You can’t perform that action at this time.
0 commit comments