chore: Fixing yoda conditions in the code (#8297)
This commit is contained in:
parent
59af26dd8e
commit
f939ebbe8a
|
|
@ -338,7 +338,7 @@ async function purgeSuperUser(db, isSilent) {
|
|||
|
||||
async function runChecks(db) {
|
||||
for (const collection of await db.collections()) {
|
||||
if (0 !== await collection.countDocuments({ "policies.users": SUPER_EMAIL })) {
|
||||
if (await collection.countDocuments({ "policies.users": SUPER_EMAIL }) !== 0 ) {
|
||||
console.error(`Super user lives on in the '${collection.collectionName}' collection.`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user