Issue #1084 - Add null check for URL Bar in the writePlaceholder() method

This commit is contained in:
Franklin DM 2019-05-11 23:52:49 +08:00 committed by Roy Tam
commit e164082a5a

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();