diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/metamask-controller.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 8a5ffb75a..63970799d 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -77,14 +77,13 @@ module.exports = class MetamaskController { // handle rpc request this.provider.sendAsync(request, function onPayloadHandled (err, response) { - if (err) { - return logger(err) - } - logger(null, request, response) - try { - stream.write(response) - } catch (err) { - logger(err) + logger(err, request, response) + if (response) { + try { + stream.write(response) + } catch (err) { + logger(err) + } } }) |