diff options
author | Ajay <[email protected]> | 2024-02-13 22:32:37 -0500 |
---|---|---|
committer | Ajay <[email protected]> | 2024-02-13 22:32:37 -0500 |
commit | 0b7a2fd197a2b961f3a7a2c00819f2c4022bbcc0 (patch) | |
tree | 2ecaed4ae4882cd472029920ef6d017536b8fabf | |
parent | 3382d8a5006430d248763dbaa93b2183367a5f76 (diff) | |
download | SponsorBlock-0b7a2fd197a2b961f3a7a2c00819f2c4022bbcc0.tar.gz SponsorBlock-0b7a2fd197a2b961f3a7a2c00819f2c4022bbcc0.zip |
Fix adding custom Invidious instances on Firefox
Fixes #815
-rw-r--r-- | src/background.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/background.ts b/src/background.ts index 812482af..23914f46 100644 --- a/src/background.ts +++ b/src/background.ts @@ -160,8 +160,8 @@ async function registerFirefoxContentScript(options: Registration) { ids: [options.id] }).catch(() => []); - if (existingRegistrations.length > 0 - && existingRegistrations[0].matches.every((match) => options.matches.includes(match))) { + if (existingRegistrations && existingRegistrations.length > 0 + && options.matches.every((match) => existingRegistrations[0].matches.includes(match))) { // No need to register another script, already registered return; } |