File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,16 @@ function isSystemError(err: Error): err is SystemError {
3030 ) ;
3131}
3232
33+ function clean < T > ( obj : T ) {
34+ const result = { } as typeof obj ;
35+ for ( const key of Object . keys ( obj ) ) {
36+ const value = ( obj as any ) [ key ] ;
37+ if ( value === undefined ) continue ;
38+ ( result as any ) [ key ] = value ;
39+ }
40+ return result ;
41+ }
42+
3343type UrlInfo = {
3444 absolutePath ?: boolean ;
3545 basePath ?: string ;
@@ -229,7 +239,7 @@ export class Connection {
229239 if ( path ) pathname += path ;
230240 if ( qs ) {
231241 if ( typeof qs === "string" ) search = `?${ qs } ` ;
232- else search = `?${ querystringify ( qs ) } ` ;
242+ else search = `?${ querystringify ( clean ( qs ) ) } ` ;
233243 }
234244 return search ? { pathname, search } : { pathname } ;
235245 }
You can’t perform that action at this time.
0 commit comments