From 27bd89adba1dbd5883d9c5e7e24c9d254e2bedca Mon Sep 17 00:00:00 2001 From: Bryce Kahle Date: Thu, 22 Aug 2019 16:17:52 -0400 Subject: [PATCH] Ensure this._transport is valid in debug msg in _open Fix #448 --- lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/main.js b/lib/main.js index c92c57f0..b25936ca 100644 --- a/lib/main.js +++ b/lib/main.js @@ -309,7 +309,7 @@ SockJS.prototype._transportClose = function(code, reason) { }; SockJS.prototype._open = function() { - debug('_open', this._transport.transportName, this.readyState); + debug('_open', this._transport && this._transport.transportName, this.readyState); if (this.readyState === SockJS.CONNECTING) { if (this._transportTimeoutId) { clearTimeout(this._transportTimeoutId);