Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

Commit 213ab01

Browse files
committed
Merge pull request #1179 from AlexVallat/Fix_for_1176
Fix for #1176
2 parents 0083784 + a694d1e commit 213ab01

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

platform/firefox/vapi-background.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,9 @@ vAPI.net.registerListeners = function() {
13261326
var details = e.data;
13271327
var browser = e.target;
13281328
var tabId = vAPI.tabs.getTabId(browser);
1329-
1329+
if (tabId === vAPI.noTabId) {
1330+
return; // Do not navigate for behind the scenes
1331+
}
13301332
//console.debug("nsIWebProgressListener: onLocationChange: " + details.url + " (" + details.flags + ")");
13311333

13321334
// LOCATION_CHANGE_SAME_DOCUMENT = "did not load a new document"

src/js/popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ uDom.onLoad(function () {
743743
var tabId = null; //If there's no tab ID specified in the query string, it will default to current tab.
744744

745745
// Extract the tab id of the page this popup is for
746-
var matches = window.location.search.match(/[\?&]tabId=([^&]+)/);
746+
var matches = window.location && window.location.search.match(/[\?&]tabId=([^&]+)/);
747747
if (matches && matches.length === 2) {
748748
tabId = matches[1];
749749
}

0 commit comments

Comments
 (0)