Fix browser console errors

This commit is contained in:
wuggy 2026-09-19 04:21:19 -07:00
commit f20132edb0
3 changed files with 19 additions and 7 deletions

View file

@ -133,8 +133,12 @@ var AboutHomeListener = {
onUpdate: function(aData) {
let doc = content.document;
if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isContentWindowPrivate(content))
doc.getElementById("launcher").setAttribute("session", "true");
if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isContentWindowPrivate(content)) {
let launcher = doc.getElementById("launcher");
if (launcher) {
launcher.setAttribute("session", "true");
}
}
// Inject search engine URL.
let docElt = doc.documentElement;