From de8dffd2529dbabadf84c6cdb97fb9f32f159e87 Mon Sep 17 00:00:00 2001 From: Rohan Chougule Date: Fri, 8 Jan 2021 19:28:37 +0530 Subject: [PATCH] refactor: strict type check in if expressions (#3744) --- lib/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/client.ts b/lib/client.ts index 70112e79d5..8ef4812b94 100644 --- a/lib/client.ts +++ b/lib/client.ts @@ -160,7 +160,7 @@ export class Client { * @private */ private close() { - if ("open" == this.conn.readyState) { + if ("open" === this.conn.readyState) { debug("forcing transport close"); this.conn.close(); this.onclose("forced server close"); @@ -186,7 +186,7 @@ export class Client { } } - if ("open" == this.conn.readyState) { + if ("open" === this.conn.readyState) { debug("writing packet %j", packet); if (!opts.preEncoded) { // not broadcasting, need to encode @@ -220,7 +220,7 @@ export class Client { * @private */ private ondecoded(packet: Packet) { - if (PacketType.CONNECT == packet.type) { + if (PacketType.CONNECT === packet.type) { this.connect(packet.nsp, packet.data); } else { const socket = this.nsps.get(packet.nsp);