Skip to content

Commit fae714b

Browse files
authored
Add a fallback if name is null (#2157)
1 parent 47c2fc3 commit fae714b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/web/pages/[user]/[type].tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
187187
return {
188188
props: {
189189
profile: {
190-
name: user.name,
190+
name: user.name || user.username,
191191
image: user.avatar,
192192
slug: user.username,
193193
theme: user.theme,

apps/web/pages/team/[slug]/[type].tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
100100
return {
101101
props: {
102102
profile: {
103-
name: team.name,
103+
name: team.name || team.slug,
104104
slug: team.slug,
105105
image: team.logo,
106106
theme: null,

0 commit comments

Comments
 (0)