Skip to content

Commit 3fc84c6

Browse files
committed
Add feature flag for WebSocket via URL query params
1 parent c9e8b00 commit 3fc84c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ui/frontend/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ import Router from './Router';
2626
import configureStore from './configureStore';
2727
import openWebSocket from './websocket';
2828

29-
// Might be null;
30-
const socket = openWebSocket(window.location);
29+
const params = new URLSearchParams(window.location.search);
30+
// openWebSocket() may return null.
31+
const socket = params.has('websocket') ? openWebSocket(window.location) : null;
3132

3233
const store = configureStore(window);
3334

0 commit comments

Comments
 (0)