diff --git a/src/events/websocket/WebSocketClients.js b/src/events/websocket/WebSocketClients.js index f585ffa74..bcc7db923 100644 --- a/src/events/websocket/WebSocketClients.js +++ b/src/events/websocket/WebSocketClients.js @@ -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}`) diff --git a/tests/integration/_testHelpers/websocketPromise.js b/tests/integration/_testHelpers/websocketPromise.js index db7dddbd8..ee46c9fd4 100644 --- a/tests/integration/_testHelpers/websocketPromise.js +++ b/tests/integration/_testHelpers/websocketPromise.js @@ -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 }) })