Browse Source

Remove unnecessary boolean casts

deepsource-autofix[bot] 4 năm trước cách đây
mục cha
commit
592299e76e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lib/socket.ts

+ 1 - 1
lib/socket.ts

@@ -157,7 +157,7 @@ export class Socket extends EventEmitter {
   }
 
   private _cleanup(): void {
-    if (!!this._socket) {
+    if (this._socket) {
       this._socket.onopen = this._socket.onmessage = this._socket.onclose = null;
       this._socket.close();
       this._socket = undefined;