Skip to content

Commit eb69e4c

Browse files
committed
fix(client): move SockJSClient definition
1 parent 24d207c commit eb69e4c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

client-src/default/socket.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
camelcase
66
*/
77

8-
// this SockJSClient is here as a default fallback, in case inline mode
9-
// is off or the client is not injected. This will be switched to
10-
// WebsocketClient when it becomes the default
11-
const SockJSClient = require('../clients/SockJSClient');
12-
138
let Client;
149
try {
1510
// if __webpack_dev_server_client__ is undefined, we should fall back
1611
// to SockJSClient
1712
Client = __webpack_dev_server_client__;
1813
} catch (e) {
14+
// this SockJSClient is here as a default fallback, in case inline mode
15+
// is off or the client is not injected. This will be switched to
16+
// WebsocketClient when it becomes the default
17+
18+
// eslint-disable-next-line global-require
19+
const SockJSClient = require('../clients/SockJSClient');
1920
Client = SockJSClient;
2021
}
2122

0 commit comments

Comments
 (0)