diff --git a/server/account/src/operations.ts b/server/account/src/operations.ts index fca23f3147..9ca8bef3b8 100644 --- a/server/account/src/operations.ts +++ b/server/account/src/operations.ts @@ -1672,7 +1672,7 @@ export async function getAllWorkspaces ( } return (await db.workspace.find({})).map((it) => { - it.accounts = it.accounts.map((it) => it.toString()) + it.accounts = (it.accounts ?? []).map((it) => it.toString()) return it }) }