chore: Fixing yoda conditions in the code (#8297)

This commit is contained in:
Sheetal Patel 2021-10-08 22:21:24 +05:30 committed by GitHub
parent 59af26dd8e
commit f939ebbe8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.`);
}
}