Suspense triggers weird bug
I have a component like this:
If I remove the suspense it works as normal.
If I remove the suspense it works as normal.
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)
}<Suspense fallback="loading">
<Foo/>
<Suspense/>