async function Foo() {
const { userId } = auth()
if (!userId) return
console.count()
const existingAccount = await getAccount(userId)
const account = existingAccount
? existingAccount
: await createAccountAndProfile() //this line should only get called the first time but it gets called twice
if (!account) throw new Error(ERR.db)
}
async function Foo() {
const { userId } = auth()
if (!userId) return
console.count()
const existingAccount = await getAccount(userId)
const account = existingAccount
? existingAccount
: await createAccountAndProfile() //this line should only get called the first time but it gets called twice
if (!account) throw new Error(ERR.db)
}