#1458 clickSubmit - Safari FIX

This commit is contained in:
Grzegorz Zając 2024-01-11 16:51:53 +01:00
parent 3cd732e4b0
commit ac17e02f66

View File

@ -34,11 +34,11 @@ const clickSubmit = (inputElement, siteURL) => {
return delay(() => {}, 500)
.then(() => loadFromLocalStorage(['autoSubmitExcludedDomains']))
.then(storage => {
const domains = storage.autoSubmitExcludedDomains;
const domains = storage.autoSubmitExcludedDomains || [];
const url = new URL(siteURL);
const hostname = url.hostname.replace(/^(www\.)?/, '').replace(/\/$/, '');
if (domains.includes(hostname)) {
if (domains && domains?.includes(hostname)) {
return false;
}