diff options
Diffstat (limited to 'app/vendor/trezor/content-script.js')
-rw-r--r-- | app/vendor/trezor/content-script.js | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |