File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ const {
75
75
ERR_HTTP_HEADERS_SENT ,
76
76
ERR_HTTP_INVALID_STATUS_CODE ,
77
77
ERR_HTTP_SOCKET_ENCODING ,
78
- ERR_INVALID_ARG_TYPE ,
79
78
ERR_INVALID_ARG_VALUE ,
80
79
ERR_INVALID_CHAR
81
80
} = codes ;
@@ -503,10 +502,10 @@ function Server(options, requestListener) {
503
502
if ( typeof options === 'function' ) {
504
503
requestListener = options ;
505
504
options = { } ;
506
- } else if ( options == null || ( typeof options === 'object' && ! ArrayIsArray ( options ) ) ) {
507
- options = { ... options } ;
505
+ } else if ( options == null ) {
506
+ options = { } ;
508
507
} else {
509
- throw new ERR_INVALID_ARG_TYPE ( ' options' , 'object' , options ) ;
508
+ validateObject ( options , 'options' ) ;
510
509
}
511
510
512
511
storeHTTPOptions . call ( this , options ) ;
You can’t perform that action at this time.
0 commit comments