File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ class URLContext {
169
169
170
170
let setURLSearchParamsContext ;
171
171
let getURLSearchParamsList ;
172
- let setURLSearchParamsList ;
172
+ let setURLSearchParams ;
173
173
174
174
class URLSearchParamsIterator {
175
175
#target;
@@ -277,8 +277,12 @@ class URLSearchParams {
277
277
obj . #context = ctx ;
278
278
} ;
279
279
getURLSearchParamsList = ( obj ) => obj . #searchParams;
280
- setURLSearchParamsList = ( obj , list ) => {
281
- obj . #searchParams = list ;
280
+ setURLSearchParams = ( obj , query ) => {
281
+ if ( query === undefined ) {
282
+ obj . #searchParams = [ ] ;
283
+ } else {
284
+ obj . #searchParams = parseParams ( query ) ;
285
+ }
282
286
} ;
283
287
}
284
288
@@ -770,9 +774,9 @@ class URL {
770
774
771
775
if ( this . #searchParams) {
772
776
if ( this . #context. hasSearch ) {
773
- setURLSearchParamsList ( this . #searchParams, parseParams ( this . search ) ) ;
777
+ setURLSearchParams ( this . #searchParams, this . search ) ;
774
778
} else {
775
- setURLSearchParamsList ( this . #searchParams, [ ] ) ;
779
+ setURLSearchParams ( this . #searchParams, undefined ) ;
776
780
}
777
781
}
778
782
}
You can’t perform that action at this time.
0 commit comments