diff --git a/app/scripts/lib/port-stream.js b/app/scripts/lib/port-stream.js index 6f4ccc6ab..607a9c9ed 100644 --- a/app/scripts/lib/port-stream.js +++ b/app/scripts/lib/port-stream.js @@ -51,11 +51,11 @@ PortDuplexStream.prototype._write = function (msg, encoding, cb) { // console.log('PortDuplexStream - sent message', msg) this._port.postMessage(msg) } - cb() } catch (err) { // console.error(err) - cb(new Error('PortDuplexStream - disconnected')) + return cb(new Error('PortDuplexStream - disconnected')) } + cb() } // util