diff --git a/src/hooks/useWs/index.tsx b/src/hooks/useWs/index.tsx index d433e9222..95ec5a645 100644 --- a/src/hooks/useWs/index.tsx +++ b/src/hooks/useWs/index.tsx @@ -23,9 +23,7 @@ const useWS = (name?: T) => { let payload = data; if (name) { - if (payload === undefined) { - payload = { [name]: 1, ...payload }; - } else if (name == 'api_token') { + if (payload === undefined || name == 'api_token') { payload = { [name]: 1, ...payload }; } } else {