From 8b7d91e514ee8f5e3858bdbd8495b2d50600ca66 Mon Sep 17 00:00:00 2001 From: Franklin DM Date: Sat, 11 May 2019 23:52:49 +0800 Subject: Issue #1084 - Add null check for URL Bar in the writePlaceholder() method --- application/palemoon/base/content/browser.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'application') diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 7672fa3a82..3f8a584bfa 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -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(); -- cgit v1.2.3