Skip to content

Commit

Permalink
feat: message?.toString() || message,
Browse files Browse the repository at this point in the history
  • Loading branch information
kungfuboy committed Sep 9, 2022
1 parent ddd60e1 commit b247841
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/workbench/node/server/socketio.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const IO = require('socket.io');
const WebSocket = require('ws');
process.on('uncaughtException', err => {
console.error('uncaughtException', err)
})
process.on('uncaughtException', (err) => {
console.error('uncaughtException', err);
});

const socket = (port = 4301) => {
const io = new IO.Server(port);
Expand Down Expand Up @@ -60,7 +60,7 @@ const socket = (port = 4301) => {
socket.emit('ws-client', {
type: 'ws-message-back',
status: 0,
content:message?.toString()
content: message?.toString() || message,
});
});

Expand Down

0 comments on commit b247841

Please sign in to comment.