Skip to content

Commit 06dc563

Browse files
committed
fix
1 parent ef1b3d3 commit 06dc563

1 file changed

Lines changed: 5 additions & 25 deletions

File tree

src/server.ts

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff 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':

0 commit comments

Comments
 (0)