diff --git a/pages/u/[identifier].tsx b/pages/u/[identifier].tsx index c06d9996c..fd796804a 100644 --- a/pages/u/[identifier].tsx +++ b/pages/u/[identifier].tsx @@ -140,12 +140,11 @@ const ProfilePage = (props: Props) => { export const getStaticPaths: GetStaticPaths = async () => { const users = await prisma.user.findMany({ - where: { NOT: [{ profile: { customUrlPath: null } }] }, include: { profile: true }, }); return { paths: users.map((u) => ({ - params: { identifier: u.profile!.customUrlPath! }, + params: { identifier: u.profile?.customUrlPath ?? u.discordId }, })), fallback: true, };