summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin DM <mrmineshafter17@gmail.com>2019-05-11 23:52:49 +0800
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-05-11 18:04:59 +0200
commit0b16661fd55ddff866f77f373583431569ba6741 (patch)
tree110b51da8672894e20f9e6617be5f497310af542
parent440b167d621beca26ce09de8afac82e3a0fb2393 (diff)
downloadUXP-0b16661fd55ddff866f77f373583431569ba6741.tar
UXP-0b16661fd55ddff866f77f373583431569ba6741.tar.gz
UXP-0b16661fd55ddff866f77f373583431569ba6741.tar.lz
UXP-0b16661fd55ddff866f77f373583431569ba6741.tar.xz
UXP-0b16661fd55ddff866f77f373583431569ba6741.zip
Issue #1084 - Add null check for URL Bar in the writePlaceholder() method
-rw-r--r--application/palemoon/base/content/browser.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 7672fa3a8..3f8a584bf 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();