Bug 1653300 - Fix the toggle of the external GnuPG preference. r=KaiE a=wsmwk
authorAlessandro Castellani <alessandro@thunderbird.net>
Fri, 24 Jul 2020 18:49:42 -0700
changeset 38981 e1710043ac0de0ad6c986ab904aae70cb3a034f2
parent 38980 797e2c49f29b29603b6577135827d13a349d391f
child 38982 8223d0c9a40e9d9575a5c3a8f72f814ef0ba227e
push id2670
push userkaie@kuix.de
push dateSat, 25 Jul 2020 02:00:53 +0000
treeherdercomm-beta@e1710043ac0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersKaiE, wsmwk
bugs1653300
Bug 1653300 - Fix the toggle of the external GnuPG preference. r=KaiE a=wsmwk
mail/extensions/am-e2e/am-e2e.js
--- a/mail/extensions/am-e2e/am-e2e.js
+++ b/mail/extensions/am-e2e/am-e2e.js
@@ -1138,18 +1138,19 @@ function updateOpenPgpSettings() {
   if (gKeyId == newKey) {
     return;
   }
 
   // Always update the GnuPG boolean pref to be sure the currently used key is
   // internal or external.
   gIdentity.setBoolAttribute(
     "is_gnupg_key_id",
-    newKey ==
-      gIdentity.getUnicharAttribute("last_entered_external_gnupg_key_id")
+    newKey &&
+      newKey ==
+        gIdentity.getUnicharAttribute("last_entered_external_gnupg_key_id")
   );
 
   gKeyId = newKey;
 
   if (gKeyId) {
     enableEncryptionControls(true);
     enableSigningControls(true);
   } else {