Skip to content

Commit

Permalink
refactor: strict type check in if expressions (#3744)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchougule authored Jan 8, 2021
1 parent f8a66fd commit de8dffd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit de8dffd

Please sign in to comment.