Bug 1629236 - Follow up to fix eslint. DONTBUILD
authorKai Engert <kaie@kuix.de>
Sat, 11 Apr 2020 23:16:38 +0200
changeset 38790 202c8ea2eccc7d6a2fc9d8d8d0a9b4d295d60faf
parent 38789 960a0f2e22ef0fc8e240e82fb0b464c84c57753d
child 38791 2a7e1fdb90772dd06e38a85f3f511721ae4ae6a1
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
bugs1629236
Bug 1629236 - Follow up to fix eslint. DONTBUILD
mail/extensions/openpgp/content/modules/keyRing.jsm
--- a/mail/extensions/openpgp/content/modules/keyRing.jsm
+++ b/mail/extensions/openpgp/content/modules/keyRing.jsm
@@ -268,27 +268,27 @@ var EnigmailKeyRing = {
     var nowSecondsSinceEpoch = nowDate.valueOf() / 1000;
 
     for (let key of keyList) {
       if (
         key.secretAvailable &&
         key.getEncryptionValidity().keyValid &&
         key.getSigningValidity().keyValid
       ) {
-        if (key.expiryTime != 0 && (key.expiryTime < nowSecondsSinceEpoch)) {
+        if (key.expiryTime != 0 && key.expiryTime < nowSecondsSinceEpoch) {
           continue;
         }
         result.all.push(key);
         if (!result.best) {
           result.best = key;
         } else if (
           result.best.algoSym === key.algoSym &&
           result.best.keySize === key.keySize
         ) {
-          if (!key.expiryTime || (key.expiryTime > result.best.expiryTime)) {
+          if (!key.expiryTime || key.expiryTime > result.best.expiryTime) {
             result.best = key;
           }
         } else if (
           result.best.algoSym.search(/^(DSA|RSA)$/) < 0 &&
           key.algoSym.search(/^(DSA|RSA)$/) === 0
         ) {
           // prefer RSA or DSA over ECC (long-term: change this once ECC keys are widely supported)
           result.best = key;