From 0734eb0ce75c82e4cbee91e94a89c3c0a56a8afb Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 29 Sep 2021 17:55:08 +0100 Subject: [PATCH] replace ?. with && --- packages/worker/src/api/controllers/global/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/worker/src/api/controllers/global/users.js b/packages/worker/src/api/controllers/global/users.js index 47356b0fd0..8d4313fc12 100644 --- a/packages/worker/src/api/controllers/global/users.js +++ b/packages/worker/src/api/controllers/global/users.js @@ -67,7 +67,7 @@ async function saveUser( // check root account users in account portal if (!env.SELF_HOSTED) { const account = await accounts.getAccount(email) - if (account?.verified) { + if (account && account.verified) { throw `Email address ${email} already in use.` } }