Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjam-deriv committed Dec 11, 2023
1 parent 967959c commit b299567
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hooks/useWs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ const useWS = <T extends TSocketEndpointNames>(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 {
Expand Down

0 comments on commit b299567

Please sign in to comment.