Skip to content

Commit

Permalink
fix: stringify websocket data
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jun 28, 2022
1 parent 0f5a630 commit 4b0f110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/events/websocket/WebSocketClients.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export default class WebSocketClients {
})

webSocketClient.on('message', (data, isBinary) => {
const message = isBinary ? String(data) : data
const message = isBinary ? data : String(data)

log.debug(`message:${message}`)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/_testHelpers/websocketPromise.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function websocketSend(ws, data) {
})

ws.on('message', (d, isBinary) => {
const message = isBinary ? String(d) : d
const message = isBinary ? d : String(d)
res({ data: message })
})

Expand Down

0 comments on commit 4b0f110

Please sign in to comment.