Fix shorthand check on user revoked status in getPrimaryUser method (#1623)

This commit is contained in:
Thomas Oberndörfer 2023-04-04 14:57:34 +02:00 committed by GitHub
parent e63ab3db4f
commit ac223bb8a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,7 +469,7 @@ class Key {
throw exception || new Error('Could not find primary user'); throw exception || new Error('Could not find primary user');
} }
await Promise.all(users.map(async function (a) { await Promise.all(users.map(async function (a) {
return a.user.revoked || a.user.isRevoked(a.selfCertification, null, date, config); return a.selfCertification.revoked || a.user.isRevoked(a.selfCertification, null, date, config);
})); }));
// sort by primary user flag and signature creation time // sort by primary user flag and signature creation time
const primaryUser = users.sort(function(a, b) { const primaryUser = users.sort(function(a, b) {