Fix broken settings persistence when options opened from privileged page and reload required.

This commit is contained in:
hackademix 2024-10-22 11:06:14 +02:00
parent 2018a5957a
commit e95013c078
No known key found for this signature in database
GPG Key ID: 231A83AFDA9C2434
1 changed files with 4 additions and 2 deletions

View File

@ -180,8 +180,10 @@ var Settings = {
if (typeof unrestrictedTab === "boolean") { if (typeof unrestrictedTab === "boolean") {
ns.unrestrictedTabs[unrestrictedTab ? "add" : "delete"](tabId); ns.unrestrictedTabs[unrestrictedTab ? "add" : "delete"](tabId);
} }
if (reloadAffected) { if (reloadAffected && tabId !== -1) {
browser.tabs.reload(tabId); try {
browser.tabs.reload(tabId);
} catch (e) {}
} }
if (xssUserChoices) await XSS.saveUserChoices(xssUserChoices); if (xssUserChoices) await XSS.saveUserChoices(xssUserChoices);