mirror of https://github.com/gorhill/uBlock.git
this fixes #399
This commit is contained in:
parent
1ba7894a29
commit
0afbb98f42
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue