Add a fallback if name is null (#2157)
parent
47c2fc3d89
commit
fae714bceb
|
@ -187,7 +187,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
return {
|
||||
props: {
|
||||
profile: {
|
||||
name: user.name,
|
||||
name: user.name || user.username,
|
||||
image: user.avatar,
|
||||
slug: user.username,
|
||||
theme: user.theme,
|
||||
|
|
|
@ -100,7 +100,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
|||
return {
|
||||
props: {
|
||||
profile: {
|
||||
name: team.name,
|
||||
name: team.name || team.slug,
|
||||
slug: team.slug,
|
||||
image: team.logo,
|
||||
theme: null,
|
||||
|
|
Loading…
Reference in New Issue