diff options
context wiring - handle and log errors
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r-- | app/scripts/background.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index 6d9f4865d..0276124cc 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -76,7 +76,11 @@ function onRpcRequest(remotePort, payload){ zeroClient.sendAsync(payload, function onPayloadHandled(err, response){ if (err) throw err // console.log('MetaMaskPlugin - RPC complete:', payload, '->', response) - remotePort.postMessage(response) + try { + remotePort.postMessage(response) + } catch (_) { + // port disconnected + } }) } |