Add a fallback if name is null (#2157)
This commit is contained in:
parent
47c2fc3d89
commit
fae714bceb
2 changed files with 2 additions and 2 deletions
|
@ -187,7 +187,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
profile: {
|
profile: {
|
||||||
name: user.name,
|
name: user.name || user.username,
|
||||||
image: user.avatar,
|
image: user.avatar,
|
||||||
slug: user.username,
|
slug: user.username,
|
||||||
theme: user.theme,
|
theme: user.theme,
|
||||||
|
|
|
@ -100,7 +100,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
profile: {
|
profile: {
|
||||||
name: team.name,
|
name: team.name || team.slug,
|
||||||
slug: team.slug,
|
slug: team.slug,
|
||||||
image: team.logo,
|
image: team.logo,
|
||||||
theme: null,
|
theme: null,
|
||||||
|
|
Loading…
Reference in a new issue