File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1203,31 +1203,11 @@ class Server<
12031203 #getClientTransport( ) {
12041204 let clientImplementation : string | undefined ;
12051205 let clientImplementationFound = true ;
1206- const webSocketServerType =
1207- this . options . webSocketServer &&
1208- typeof this . options . webSocketServer === 'object'
1209- ? this . options . webSocketServer . type
1210- : undefined ;
1211-
1212- const isKnownWebSocketServerImplementation = webSocketServerType === 'ws' ;
1213-
1214- let clientTransport : string | undefined ;
1215-
1216- if ( this . options . client ) {
1217- if (
1218- typeof ( this . options . client as DevServerClient ) . webSocketTransport !==
1219- 'undefined'
1220- ) {
1221- clientTransport = ( this . options . client as DevServerClient )
1222- . webSocketTransport ;
1223- } else if ( isKnownWebSocketServerImplementation ) {
1224- clientTransport = webSocketServerType ;
1225- } else {
1226- clientTransport = 'ws' ;
1227- }
1228- } else {
1229- clientTransport = 'ws' ;
1230- }
1206+ let clientTransport =
1207+ typeof this . options . client === 'object' &&
1208+ this . options . client . webSocketTransport !== 'undefined'
1209+ ? this . options . client . webSocketTransport
1210+ : 'ws' ;
12311211
12321212 switch ( typeof clientTransport ) {
12331213 case 'string' :
You can’t perform that action at this time.
0 commit comments