From cbb8301e0751846a663fa5c30e4aedfdbc6a3a82 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Sat, 5 Dec 2020 14:23:28 +0530 Subject: [PATCH] Update 1.Validation.ts --- src/WAConnection/1.Validation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WAConnection/1.Validation.ts b/src/WAConnection/1.Validation.ts index 1afdfb9..d119bb2 100644 --- a/src/WAConnection/1.Validation.ts +++ b/src/WAConnection/1.Validation.ts @@ -49,7 +49,7 @@ export class WAConnection extends Base { else json.push ('takeover') // send login every 10s const sendLoginReq = () => { - if (this.conn.readyState !== this.conn.OPEN) { + if (this.conn?.readyState !== this.conn.OPEN) { this.logger.warn('Received login timeout req when WS not open, ignoring...') return }