Skip to content

Commit de8dffd

Browse files
authored
refactor: strict type check in if expressions (#3744)
1 parent f8a66fd commit de8dffd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class Client {
160160
* @private
161161
*/
162162
private close() {
163-
if ("open" == this.conn.readyState) {
163+
if ("open" === this.conn.readyState) {
164164
debug("forcing transport close");
165165
this.conn.close();
166166
this.onclose("forced server close");
@@ -186,7 +186,7 @@ export class Client {
186186
}
187187
}
188188

189-
if ("open" == this.conn.readyState) {
189+
if ("open" === this.conn.readyState) {
190190
debug("writing packet %j", packet);
191191
if (!opts.preEncoded) {
192192
// not broadcasting, need to encode
@@ -220,7 +220,7 @@ export class Client {
220220
* @private
221221
*/
222222
private ondecoded(packet: Packet) {
223-
if (PacketType.CONNECT == packet.type) {
223+
if (PacketType.CONNECT === packet.type) {
224224
this.connect(packet.nsp, packet.data);
225225
} else {
226226
const socket = this.nsps.get(packet.nsp);

0 commit comments

Comments
 (0)