mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-22 02:12:44 +01: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
@ -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 New Issue
Block a user