diff options
-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; } |