Skip to content

Commit

Permalink
fix(deps): update dependency ws to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgloning committed Jan 10, 2023
1 parent e0d5df8 commit 1ecc94b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"cors": "^2.8.5",
"express": "^4.17.1",
"ws": "^7.2.3",
"ws": "^7.2.3 || ^8.0.0",
"yargs": "^17.6.2"
},
"devDependencies": {
Expand All @@ -75,7 +75,7 @@
"@types/express": "^4.17.3",
"@types/mocha": "^10.0.0",
"@types/node": "^14.18.33",
"@types/ws": "^7.2.3",
"@types/ws": "^7.2.3 || ^8.0.0",
"@types/yargs": "^17.0.19",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/services/webSocketServer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ export class WebSocketServer extends EventEmitter implements IWebSocketServer {
});

// Handle messages from peers.
socket.on("message", (data: WebSocketLib.Data) => {
socket.on("message", (data) => {
try {
const message = JSON.parse(data as string);
const message = JSON.parse(data.toString());

message.src = client.getId();

Expand Down

0 comments on commit 1ecc94b

Please sign in to comment.