From 0b7a2fd197a2b961f3a7a2c00819f2c4022bbcc0 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 13 Feb 2024 22:32:37 -0500 Subject: [PATCH] Fix adding custom Invidious instances on Firefox Fixes #815 --- src/background.ts | 4 ++-- 1 file 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; }