diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js index d0a05ed..4886bb6 100644 --- a/platform/firefox/vapi-client.js +++ b/platform/firefox/vapi-client.js @@ -149,14 +149,16 @@ vAPI.messaging = { /******************************************************************************/ var toggleListener = function({type, persisted}) { - if ( !persisted || !vAPI.messaging.connector ) { + if ( !vAPI.messaging.connector ) { return; } if ( type === 'pagehide' ) { removeMessageListener(); + return; } - else { + + if ( persisted ) { addMessageListener(vAPI.messaging.connector); } };