diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-06-30 10:24:30 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-07-06 11:42:47 +0200 |
| commit | a9ffd79035fad6bf8d90ba37028288be261b8aaa (patch) | |
| tree | 012b9969e45a0946cf1a28c13cd73e8924e0d757 /app/lib | |
| parent | 1567494542a9303a4767b8293e69fde6158a765b (diff) | |
| download | mullvadvpn-a9ffd79035fad6bf8d90ba37028288be261b8aaa.tar.xz mullvadvpn-a9ffd79035fad6bf8d90ba37028288be261b8aaa.zip | |
Allow to wait for the websocket even if the instance isnt created yet
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/jsonrpc-ws-ipc.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/jsonrpc-ws-ipc.js b/app/lib/jsonrpc-ws-ipc.js index 8927e6910d..7c8cf55302 100644 --- a/app/lib/jsonrpc-ws-ipc.js +++ b/app/lib/jsonrpc-ws-ipc.js @@ -125,7 +125,7 @@ export default class Ipc { _getWebSocket() { return new Promise(resolve => { - if (this._websocket.readyState === 1) { // Connected + if (this._websocket && this._websocket.readyState === 1) { // Connected resolve(this._websocket); } else { log.debug('Waiting for websocket to connect'); |
