mirror of https://github.com/gorhill/uBlock.git
this fixes #640
This commit is contained in:
parent
f681bac407
commit
6c65672db0
|
@ -19,7 +19,7 @@
|
|||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* global ADDON_UNINSTALL, APP_SHUTDOWN, APP_STARTUP */
|
||||
/* global ADDON_UNINSTALL, APP_SHUTDOWN */
|
||||
/* exported startup, shutdown, install, uninstall */
|
||||
|
||||
'use strict';
|
||||
|
@ -48,7 +48,7 @@ const restartListener = {
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
function startup(data, reason) {
|
||||
function startup(data/*, reason*/) {
|
||||
if ( data !== undefined ) {
|
||||
version = data.version;
|
||||
}
|
||||
|
@ -86,7 +86,13 @@ function startup(data, reason) {
|
|||
);
|
||||
};
|
||||
|
||||
if ( reason !== APP_STARTUP ) {
|
||||
var ready = false;
|
||||
try {
|
||||
ready = appShell.hiddenDOMWindow &&
|
||||
appShell.hiddenDOMWindow.document;
|
||||
} catch (ex) {
|
||||
}
|
||||
if ( ready ) {
|
||||
onReady();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue