Fix adding custom Invidious instances on Firefox

Fixes #815
This commit is contained in:
Ajay 2024-02-13 22:32:37 -05:00
parent 3382d8a500
commit 0b7a2fd197

View file

@ -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;
}