Bug 929649 - Do not reference "customizeMailAlert" button in preferences on Mac OS X where it does not exist. r=bwinton
authoraceman <acelists@atlas.sk>
Tue, 12 Nov 2013 17:08:49 -0500
changeset 16896 8a13153a39dc6a6418d41e5db7d4b443c8003679
parent 16895 daecdfed4ef31c7519c8354512e53f22bdac754d
child 16897 34f8c2ebcc73ea6093064bc85e5628eae0e94469
push id1074
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:47:23 +0000
treeherdercomm-beta@6b791b5369ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwinton
bugs929649
Bug 929649 - Do not reference "customizeMailAlert" button in preferences on Mac OS X where it does not exist. r=bwinton CLOSED TREE
mail/components/preferences/general.js
--- a/mail/components/preferences/general.js
+++ b/mail/components/preferences/general.js
@@ -143,12 +143,16 @@ var gGeneralPane = {
   updateStartPage: function()
   {
     document.getElementById("mailnewsStartPageUrl").disabled =
       !document.getElementById("mailnewsStartPageEnabled").checked;
   },
 
   updateCustomizeAlert: function()
   {
-    document.getElementById("customizeMailAlert").disabled =
-      !document.getElementById("newMailNotificationAlert").checked;
+    // The button does not exist on all platforms.
+    let customizeAlertButton = document.getElementById("customizeMailAlert");
+    if (customizeAlertButton) {
+      customizeAlertButton.disabled =
+        !document.getElementById("newMailNotificationAlert").checked;
+    }
   }
 };