Skip to content

Commit e95013c

Browse files
committed
Fix broken settings persistence when options opened from privileged page and reload required.
1 parent 2018a59 commit e95013c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bg/Settings.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ var Settings = {
180180
if (typeof unrestrictedTab === "boolean") {
181181
ns.unrestrictedTabs[unrestrictedTab ? "add" : "delete"](tabId);
182182
}
183-
if (reloadAffected) {
184-
browser.tabs.reload(tabId);
183+
if (reloadAffected && tabId !== -1) {
184+
try {
185+
browser.tabs.reload(tabId);
186+
} catch (e) {}
185187
}
186188

187189
if (xssUserChoices) await XSS.saveUserChoices(xssUserChoices);

0 commit comments

Comments
 (0)