Skip to content

Commit

Permalink
this fixes #399
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Jun 25, 2015
1 parent 1ba7894 commit 0afbb98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platform/firefox/vapi-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,12 @@ var tabWatcher = (function() {

var currentBrowser = function() {
var win = Services.wm.getMostRecentWindow('navigator:browser');
// https://github.com/gorhill/uBlock/issues/399
// getTabBrowser() can return null at browser launch time.
var tabBrowser = getTabBrowser(win);
if ( tabBrowser === null ) {
return null;
}
return browserFromTarget(getTabBrowser(win).selectedTab);
};

Expand Down

0 comments on commit 0afbb98

Please sign in to comment.