aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2016-02-11 03:46:13 +0800
committerkumavis <aaron@kumavis.me>2016-02-11 03:46:13 +0800
commit066996396ff0ec6a9f6724e1f6469a0bc67a07ca (patch)
tree5c9e34bd1fe94ffcd2c96b2c288b879258f22489 /app/scripts/background.js
parentebf60843fabd743cbf821611fc9343e1d4a323b7 (diff)
downloadtangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar.gz
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar.bz2
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar.lz
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar.xz
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.tar.zst
tangerine-wallet-browser-066996396ff0ec6a9f6724e1f6469a0bc67a07ca.zip
context wiring - handle and log errors
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js6
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
+ }
})
}