diff --git a/app/vendor/trezor/content-script.js b/app/vendor/trezor/content-script.js index c8888c1b6..a21332f46 100644 --- a/app/vendor/trezor/content-script.js +++ b/app/vendor/trezor/content-script.js @@ -6,6 +6,10 @@ let port = chrome.runtime.connect({ name: 'trezor-connect' }); port.onMessage.addListener(message => { window.postMessage(message, window.location.origin); }); +port.onDisconnect.addListener(d => { + port = null; +}); + /* Passing messages from popup to background script */