Skip to content

Commit ba0dc1a

Browse files
authored
Fixed missing variable initialization
Since ws was never initialized on line 86 it defaulted to undefined which means that if(ws !== null) on line 100 becomes true
1 parent 22419a7 commit ba0dc1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/web-socket-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class WebSocketHandler implements WebSocketInterface {
8383
}
8484

8585
let queue: Promise<void> = Promise.resolve();
86-
let ws: WebSocket | null;
86+
let ws: WebSocket | null = null;
8787

8888
async function processData(data): Promise<void> {
8989
const buff = Buffer.alloc(data.length + 1);

0 commit comments

Comments
 (0)