mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix spurious error in content script
No guarantee vAPI.bootstrap will still be present when callback executes.
This commit is contained in:
parent
9f4123a4e2
commit
5133991f7e
1 changed files with 1 additions and 3 deletions
|
|
@ -19,8 +19,6 @@
|
|||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// If content scripts are already injected, we need to respond with `false`,
|
||||
// to "should inject content scripts?"
|
||||
//
|
||||
|
|
@ -31,7 +29,7 @@
|
|||
try {
|
||||
const status = vAPI.uBO !== true;
|
||||
if ( status === false && vAPI.bootstrap ) {
|
||||
self.requestIdleCallback(( ) => vAPI && vAPI.bootstrap());
|
||||
self.requestIdleCallback(( ) => vAPI?.bootstrap());
|
||||
}
|
||||
return status;
|
||||
} catch(ex) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue