mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
this fixes #399
This commit is contained in:
parent
1ba7894a29
commit
0afbb98f42
1 changed files with 6 additions and 0 deletions
|
@ -908,6 +908,12 @@ var tabWatcher = (function() {
|
||||||
|
|
||||||
var currentBrowser = function() {
|
var currentBrowser = function() {
|
||||||
var win = Services.wm.getMostRecentWindow('navigator:browser');
|
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);
|
return browserFromTarget(getTabBrowser(win).selectedTab);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue