[Mypal] Add null check for URL Bar in the writePlaceholder() method

This commit is contained in:
Fedor 2019-05-20 09:03:04 +03:00
parent e1e1cbb749
commit d54fa93da9

View File

@ -412,6 +412,10 @@ var gURLBarSettings = {
},
writePlaceholder: function() {
if (!gURLBar) {
return;
}
let attribute = "placeholder";
let prefs = this.prefSuggests.map(pref => {
return this.prefSuggest + pref;
@ -3471,6 +3475,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
// Update the urlbar
if (gURLBar) {
gURLBarSettings.writePlaceholder();
URLBarSetURI();
XULBrowserWindow.asyncUpdateUI();
BookmarkingUI.updateStarState();