Bug 1377740 - Only set the url when the link exists n?nechen r=nechen
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 24 Jul 2017 08:16:55 +0200
changeset 419236 059f64f6bc238321b9f98711a7eb9939586276ae
parent 419235 00eedf2ff919a2122459893d28d435b4815f2b30
child 419237 a46ee323e1e75963076316ecd8fa14f4b763a5c2
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnechen
bugs1377740
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1377740 - Only set the url when the link exists n?nechen r=nechen MozReview-Commit-ID: AqChrNYGChw
mobile/android/chrome/content/about.js
--- a/mobile/android/chrome/content/about.js
+++ b/mobile/android/chrome/content/about.js
@@ -49,17 +49,19 @@ function init() {
       {id: "faqURL",          pref: "app.faqURL"},
       {id: "privacyURL",      pref: "app.privacyURL"},
       {id: "creditsURL",      pref: "app.creditsURL"},
     ];
 
     links.forEach(function(link) {
       let url = formatter.formatURLPref(link.pref);
       let element = document.getElementById(link.id);
-      element.setAttribute("href", url);
+      if (element) {
+        element.setAttribute("href", url);
+      }
     });
   } catch (ex) {}
 
 #ifdef MOZ_UPDATER
   function expectUpdateResult() {
     EventDispatcher.instance.registerListener(function listener(event, data, callback) {
       EventDispatcher.instance.unregisterListener(listener, event);
       showUpdateMessage(data.result);