diff --git a/packages/dota/src/db/getDBUser.ts b/packages/dota/src/db/getDBUser.ts index 3ca60cd2..18cd7663 100644 --- a/packages/dota/src/db/getDBUser.ts +++ b/packages/dota/src/db/getDBUser.ts @@ -114,7 +114,7 @@ export default async function getDBUser({ return client } - const Account = user?.Account?.shift() + const Account = Array.isArray(user?.Account) ? user.Account[0] : user.Account if (!Account) { logger.info('Invalid token missing Account??', { token: lookupToken }) invalidTokens.add(lookupToken)