File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -755,11 +755,8 @@ class Server {
755
755
}
756
756
}
757
757
758
- listen ( port , hostname = this . options . host , fn ) {
759
- if (
760
- typeof this . options . host !== 'undefined' &&
761
- hostname !== this . options . host
762
- ) {
758
+ listen ( port , hostname , fn ) {
759
+ if ( typeof hostname !== 'undefined' && hostname !== this . options . host ) {
763
760
throw new Error (
764
761
'The host specified in options is different from the host passed as an argument.'
765
762
) ;
@@ -771,6 +768,8 @@ class Server {
771
768
) ;
772
769
}
773
770
771
+ hostname = this . options . host ;
772
+
774
773
if ( hostname === 'local-ip' ) {
775
774
this . options . host =
776
775
internalIp . v4 . sync ( ) || internalIp . v6 . sync ( ) || '0.0.0.0' ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ jest.mock('sockjs/lib/transport');
12
12
13
13
const baseDevConfig = {
14
14
port,
15
+ host : 'localhost' ,
15
16
static : false ,
16
17
} ;
17
18
You can’t perform that action at this time.
0 commit comments