Suspense triggers weird bug

I have a component like this:
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/>

If I remove the suspense it works as normal.
Was this page helpful?