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 @@ -750,11 +750,8 @@ class Server {
750
750
}
751
751
}
752
752
753
- listen ( port , hostname = this . options . host , fn ) {
754
- if (
755
- typeof this . options . host !== 'undefined' &&
756
- hostname !== this . options . host
757
- ) {
753
+ listen ( port , hostname , fn ) {
754
+ if ( typeof hostname !== 'undefined' && hostname !== this . options . host ) {
758
755
throw new Error (
759
756
'The host specified in options is different from the host passed as an argument.'
760
757
) ;
@@ -766,6 +763,8 @@ class Server {
766
763
) ;
767
764
}
768
765
766
+ hostname = this . options . host ;
767
+
769
768
if ( hostname === 'local-ip' ) {
770
769
this . options . host =
771
770
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