diff --git a/web/src/api/ws.jsx b/web/src/api/ws.jsx index 9765ccca8..2f7757d61 100644 --- a/web/src/api/ws.jsx +++ b/web/src/api/ws.jsx @@ -5,7 +5,7 @@ import { useCallback, useContext, useEffect, useReducer } from 'preact/hooks'; import useWebSocket, { ReadyState } from 'react-use-websocket'; const initialState = Object.freeze({ __connected: false }); -export const WS = createContext({ state: initialState, connection: null }); +export const WS = createContext({ state: initialState, readyState: null, sendJsonMessage: () => {} }); function reducer(state, { topic, payload, retain }) { switch (topic) {