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") {
ns.unrestrictedTabs[unrestrictedTab ? "add" : "delete"](tabId);
}
if (reloadAffected) {
browser.tabs.reload(tabId);
if (reloadAffected && tabId !== -1) {
try {
browser.tabs.reload(tabId);
} catch (e) {}
}
if (xssUserChoices) await XSS.saveUserChoices(xssUserChoices);