From e62a5503a9e32c785029bf0fa6fd890171218d88 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 23 Oct 2018 10:42:14 -0400 Subject: [PATCH] fix undefined `connection` in provider --- lib/modules/blockchain_connector/provider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/blockchain_connector/provider.js b/lib/modules/blockchain_connector/provider.js index a9ce85d2..c7563f03 100644 --- a/lib/modules/blockchain_connector/provider.js +++ b/lib/modules/blockchain_connector/provider.js @@ -76,7 +76,7 @@ class Provider { if (this.type === 'rpc') { return !!this.provider; } else if (this.type === 'ws') { - return this.provider && this.provider.connection._connection.connected; + return this.provider && this.provider.connection._connection && this.provider.connection._connection.connected; } return false;