state.js: do not connect unless a state subclass is defined (#2259)
This commit is contained in:
parent
77405d1701
commit
21000d9889
@ -549,7 +549,7 @@ export const useEventLoop = (
|
||||
return;
|
||||
}
|
||||
// only use websockets if state is present
|
||||
if (Object.keys(initialState).length > 0) {
|
||||
if (Object.keys(initialState).length > 1) {
|
||||
// Initialize the websocket connection.
|
||||
if (!socket.current) {
|
||||
connect(socket, dispatch, ['websocket', 'polling'], setConnectError, client_storage)
|
||||
|
Loading…
Reference in New Issue
Block a user