From f939ebbe8a4864bd48c840444d368e8ce8c9eedb Mon Sep 17 00:00:00 2001 From: Sheetal Patel <76812440+sheetal2001p@users.noreply.github.com> Date: Fri, 8 Oct 2021 22:21:24 +0530 Subject: [PATCH] chore: Fixing yoda conditions in the code (#8297) --- app/server/scripts/node/acl-migration.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/server/scripts/node/acl-migration.js b/app/server/scripts/node/acl-migration.js index 7519a42b08..cadc589be2 100644 --- a/app/server/scripts/node/acl-migration.js +++ b/app/server/scripts/node/acl-migration.js @@ -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.`); } }