mirror of https://github.com/embarklabs/embark.git
fix undefined `connection` in provider
This commit is contained in:
parent
81c62b1006
commit
e62a5503a9
|
@ -76,7 +76,7 @@ class Provider {
|
||||||
if (this.type === 'rpc') {
|
if (this.type === 'rpc') {
|
||||||
return !!this.provider;
|
return !!this.provider;
|
||||||
} else if (this.type === 'ws') {
|
} 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;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue