Explorar o código

fix: getRules in old Chrome wants 2 args

tophf %!s(int64=3) %!d(string=hai) anos
pai
achega
2e78544b45
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/background/index.js

+ 1 - 1
src/background/index.js

@@ -133,7 +133,7 @@ initialize(() => {
   const api = global.chrome.declarativeContent;
   if (api) {
     // Using declarativeContent to run content scripts earlier than document_start
-    api.onPageChanged.getRules(async ([rule]) => {
+    api.onPageChanged.getRules(/* for old Chrome */ null, async ([rule]) => {
       const id = rule?.id;
       const newId = process.env.INIT_FUNC_NAME;
       if (id === newId) {